Configuring Metric Collection Rules for CCE Clusters
By adding ServiceMonitor or PodMonitor, you can configure metric collection rules to monitor the applications deployed in CCE clusters.
Prerequisite
Both your service and CCE cluster have been connected to a Prometheus instance for CCE. For details, see Using Prometheus Monitoring to Monitor CCE Cluster Metrics.
Constraints
Only when kube-prometheus-stack installed on the Add-ons page of CCE is later than 3.9.0 and is still running, can you enable or disable collection rules.
To view the kube-prometheus-stack status, log in to the CCE console and access the cluster page, choose Add-ons in the navigation pane, and locate that add-on on the right.
Adding ServiceMonitor
- Log in to the AOM 2.0 console.
- In the navigation pane on the left, choose Prometheus Monitoring > Instances.
- In the instance list, click a desired Prometheus instance for CCE. The Metric Management page is displayed.
- On the Settings tab page, select a cluster from the Cluster drop-down list and select ServiceMonitor from the Monitoring drop-down list.
- Click Add ServiceMonitor. In the displayed dialog box, set related parameters and click OK. Figure 1 Adding ServiceMonitor
After the configuration is complete, the new collection rule is displayed in the collection rule list.
Figure 2 Collection rule list
Adding PodMonitor
- Log in to the AOM 2.0 console.
- In the navigation pane on the left, choose Prometheus Monitoring > Instances.
- In the instance list, click a desired Prometheus instance for CCE. The Metric Management page is displayed.
- On the Settings tab page, select a cluster from the Cluster drop-down list and select PodMonitor from the Monitoring drop-down list.
- Click Add PodMonitor. In the displayed dialog box, set related parameters and click OK. Figure 3 Adding PodMonitor
After the configuration is complete, the new collection rule is displayed in the collection rule list.
Figure 4 Collection rule list
Other Operations
Perform the operations listed in Table 1 if needed.
| Operation | Description |
|---|---|
| Viewing a metric | In the list, you can view the name, tag, namespace, and configuration mode. Click View in the Operation column. In the displayed dialog box, view details about the ServiceMonitor or PodMonitor collection rule. |
| Enabling or disabling a collection rule | On the Metric Management > Settings page, click |
| Deleting collection rules | Built-in collection rules cannot be deleted. Click Delete in the Operation column to delete a custom collection rule. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot


