This topic describes how to integrate Managed Service for Prometheus into a Container Service for Kubernetes (ACK) cluster, view monitoring dashboards, and configure alert rules.
Prerequisites
-
Activate Managed Service for Prometheus. For more information, see Prometheus instance billing.
-
Create a Kubernetes cluster. For more information, see Create an ACK managed cluster.
-
Activate Alibaba Cloud Resource Center. For more information, see Activate Resource Center.
Step 1: Integrate your container cluster
Managed Service for Prometheus and Container Service for Kubernetes are integrated by default. You can integrate Prometheus into your container cluster in one of two ways.
For ACK managed clusters Pro Edition, you can choose either Basic Edition of container cluster monitoring or ACK Cluster Monitoring Pro Edition. The Basic Edition of container cluster monitoring is free. The ACK Cluster Monitoring Pro Edition is billed based on the number of nodes in your cluster. For more information, see Container monitoring billing.
Method 1: Integrate through the Container Service console
-
Integrate when creating a new cluster
Prometheus capabilities are integrated by default when you create a Container Service cluster to provide container monitoring.
In the Container Monitoring configuration item, select Pro Edition of container cluster monitoring. This edition uses Managed Service for Prometheus, retains data for 90 days, provides a managed collection agent, and includes built-in Grafana monitoring dashboards. In the Cost Management Suite configuration item, select Enable ACK Cost Management Suite - Cost Insight.
-
Existing Cluster Integration
Follow these steps to integrate Prometheus into an existing cluster.
-
Log on to the ACK console. In the left navigation pane, click Clusters.
-
On the Clusters page, click the name of your cluster. In the left navigation pane, click .
-
On the Prometheus Monitoring page, click Install Now.
Note-
The console automatically installs components and checks dashboards. After installation completes, click each tab to view monitoring data.
-
It takes about 1–2 minutes for monitoring data to appear after Prometheus integrates with your container cluster, so dashboards may initially show no data.
-
-
Method 2: Integrate through the ARMS or Prometheus console
You can integrate your container cluster using the Application Real-Time Monitoring Service (ARMS) console or the Managed Service for Prometheus console.
Log on to the Managed Service for Prometheus console. In the left-side navigation pane, click Integration Center.
-
On the Integration Center page, click the Infrastructure tab. In the Infrastructure section, select Container Cluster Monitoring.
-
In the Container Cluster Monitoring panel, follow the on-screen instructions to complete integration.
It takes about 1–2 minutes for monitoring data to appear after Prometheus integrates with your container cluster, so dashboards may initially show no data.
Step 2: View monitoring dashboards
Prometheus includes many built-in container monitoring dashboards—such as cluster overview, core components, nodes, and pods—and displays them in the Container Service, ARMS, and Prometheus consoles. Use one of the following methods to view dashboards.
Method 1: View in the Container Service console
-
Log on to the ACK console. In the left navigation pane, click Clusters.
-
On the Clusters page, click the name of your cluster. In the left navigation pane, click .
-
On the Prometheus Monitoring page, click the dashboard you want to view to see its monitoring data.
Method 2: View in the ARMS or Prometheus console
You can also log on to the Application Real-Time Monitoring Service (ARMS) console or the Managed Service for Prometheus console to view cluster dashboards.
Log on to the Managed Service for Prometheus console. In the left-side navigation pane, click Integration Management.
-
On the Integration Management page, click the Query Dashboards tab.
-
Select the cluster you want to view in the container environment list to see its monitoring dashboard.
Step 3: Configure alerts
Log on to the Managed Service for Prometheus console. In the left-side navigation pane, click Integration Management.
-
On the Integration Management page, go to the Integrated Environments tab. Select Container Service. In the container environment list, click the name of your destination environment to open its details page.
-
On the Component Management tab, in the Addon Type section, click Alert Rules to view built-in Prometheus alert notifications.
Built-in alert rules generate alert events but do not send notifications. To send alert notifications to email or other platforms, click Edit to configure notification methods. On the alert configuration page, you can also customize alert thresholds, duration, content, and more. For detailed alert configuration, see Create Prometheus alert rules.
In simple mode, you can set notification recipients, notification time windows, and repeat policies.
Related operations
How do I upgrade from Basic Edition to Pro Edition of container cluster monitoring?
Upgrade by clicking Upgrade to Pro Edition in the container environment list on the Integration Management page in the Application Real-Time Monitoring Service (ARMS) console.