All Products
Search
Document Center

Container Compute Service:Use Managed Service for Prometheus to monitor ACS clusters

Last Updated:Aug 22, 2024

You can view predefined dashboards and performance metrics for Alibaba Cloud Container Compute Service (ACS) clusters in Managed Service for Prometheus. This topic describes how to interface Managed Service for Prometheus with ACS clusters. This topic also describes how to configure alert rules and custom metrics in Managed Service for Prometheus and use Grafana to display metrics.

Introduction to Managed Service for Prometheus

Managed Service for Prometheus is a fully managed monitoring service that is interfaced with the open source Prometheus ecosystem. Managed Service for Prometheus monitors various components and provides multiple ready-to-use dashboards. ACS clusters are fully compatible with the Prometheus ecosystem and common features. Managed Service for Prometheus saves you the effort to manage underlying services, such as data storage, data presentation, and system maintenance. For more information about Managed Service for Prometheus, see What is Managed Service for Prometheus?.

Prometheus monitoring agents

By default, the managed Prometheus agent is installed when ACS clusters are created. In the left-side navigation pane, choose Operations > Prometheus Monitoring.

Type

Description

Managed

The agent allows Managed Service for Prometheus to directly collect monitoring data from containers in ACS clusters and allow you to use out-of-the-box features and enjoy a serverless experience provided by Managed Service for Prometheus.

Note

When you create an ACS cluster, Managed Service for Prometheus is enabled by default. For more information, see Create an ACK Serverless cluster. The default Managed Service for Prometheus service is free of charge.

Configure alert rules in Managed Service for Prometheus

Managed Service for Prometheus allows you to create alert rules for monitoring jobs. When alert rules are met, you can receive alerts through emails, text messages, and DingTalk notifications in real time. This helps you detect errors in a proactive manner. When an alert rule is met, notifications are sent to the contact group that you specified. Before you can create a contact group, you must create a contact. When you create a contact, you can specify the mobile phone number and email address of the contact to receive notifications. You can also provide a DingTalk chatbot webhook URL that is used to automatically send alert notifications.

Step 1: Create a contact

  1. Log on to the Managed Service for Prometheus console. In the upper-left corner of the Managed Service for Prometheus page, select the region where your cluster is deployed.

  2. In the left-side navigation pane, choose Alert Management > Notification Objects.

  3. On the Contacts tab, click Create Contact.

  4. In the Create Contact dialog box, set the following parameters and click OK.

    Parameter

    Description

    Name

    The name of the contact.

    Phone Number

    After you specify the mobile phone number of a contact, the contact can be notified by phone call and text message.

    Note

    You can specify only verified mobile phone numbers in a notification policy. For more information about how to verify a mobile phone number, see Verify mobile phone numbers.

    Email

    After you specify the email address of a contact, the contact can be notified by email.

    Contact Group

    Select the contact group to which you want to add the contact. For more information, see Contact groups.

    Method to Resend Notifications If Phone Notifications Fail

    Select the method for resending notifications that applies if phone notifications fail.

    You can set global default values on the Contacts tab. For more information, see the Default settings for contacts section.

    User ID

    The ID of the instant messaging (IM) tool, such as DingTalk, Lark, or WeCom.

    A valid user ID can be used to mention a contact within a group. If you want to use this feature, enter a valid user ID of the IM tool.

    To mention a contact within a Lark or WeCom group, the field is required. If you want to mention a contact within a DingTalk group, the field is optional.

    Important
    • You must specify either a mobile phone number or an email address. Each mobile phone number or email address can be used for only one contact.

    • A DingTalk chatbot can no longer be configured as a contact. To create a DingTalk chatbot, go to the DingTalk/Lark/WeCom tab. For more information, see DingTalk chatbots. Existing DingTalk chatbots remain unchanged.

Step 2: Configure alert rules

  1. Log on to the Managed Service for Prometheus console. In the left-side navigation pane, click Integration Management.

  2. You are redirected to the Application Real-Time Monitoring Service (ARMS) console. In the left-side navigation pane, click Integration Management. On the page that appears, click the name of the cluster that you want to manage to go to the Integration Management page.

  3. Click the Alert Rule tab. Find the alert rule that you want to manage in the alert rule list and click Edit in the Actions column. Configure the alert rule and click Save. For more information, see Create an alert rule for a Prometheus instance or Create an alert rule.

Custom Prometheus metrics

Managed Service for Prometheus also allows you to collect and configure advanced metrics. For more information about the configurations, see the following topics:

Enable network monitoring for a cluster by using CoreDNS and the ALB Ingress controller

ACS is integrated with ARMS by default and collects core control plane and basic metrics related to pods and containers free of charge. However, ACS does not collect metrics related to CoreDNS and the ALB Ingress controller of the cluster. You can log on to the Managed Service for Prometheus console to configure the metrics. Data collection fees are charged for CoreDNS and the ALB Ingress controller.

In the left-side navigation pane of the ACS console, choose Operations > Add-ons. On the page that appears, find and install ALB Ingress Controller and CoreDNS as needed.

imageYou can also install the open source versions in the cluster. For more information, see Use Integration Center to integrate monitoring data.