You can add metrics of Alibaba Cloud services in CloudMonitor. After the metric data is imported to CloudMonitor, you can create a dashboard to view the monitoring chart of a specific metric.
Prerequisites
A namespace is created. For more information, see Create a namespace.
Background information
After tags are added to resources of Alibaba Cloud services, you can wait up to 1 hour to view the tags in the Hybrid Cloud Monitoring console. However, the resource tags that are displayed in the Hybrid Cloud Monitoring console are different from the original resource tags. To comply with the Prometheus protocol, Hybrid Cloud Monitoring changes invalid tags based on the following rules:
If a tag does not start with
[a-zA-Z_]
, the beginning of the tag is changed tof_
. For example, if an original resource tag is66
, the tag is changed tof_66
.If a tag does not meet the
[a-zA-Z0-9_]
condition (the tag contains special characters), the special character is changed to an underscore (_). For example, if an original resource tag istest.6
, the tag is changed totest_6
.If a tag starts with two or more underscores (_), an unexpected error may occur. Examples:
__my_key__
and___my_key___
.
For tags that comply with the Prometheus protocol, the tag_
prefix is directly added. For tags that do not comply with the Prometheus protocol, the tag_
prefix is added after the tags are changed based on the preceding rules. For example, if an original resource tag is test.6
, the tag is changed to tag_test_6
.
Add metrics of Alibaba Cloud services
- Log on to the CloudMonitor console.
In the left-side navigation pane, choose .
Find the namespace that you want to manage and click the icon for account quantity, cloud service quantity, metric quantity, or task quantity in the Metric Data column.
NoteTask quantity indicates the total number of tasks that are used to import metrics from self-managed data centers, AWS, Tencent Cloud, and Prometheus, on-premises log monitoring data, and Simple Log Service log monitoring data.
On the Alibaba Cloud Service Metrics tab of the Metric management panel, add metrics of Alibaba Cloud services.
Add metrics within an Alibaba Cloud account
If you log on to the CloudMonitor console with an Alibaba Cloud account or as a RAM user, you can connect only the Alibaba Cloud services that are activated for the account to CloudMonitor.
Add Alibaba Cloud services.
Click the icon next to Current Account.
In the Add Product dialog box, select the cloud services that you want to add and click OK.
Add metrics of the Alibaba Cloud services.
Select a cloud service and click Add metric.
In the Add metric dialog box, select the metrics that you want to add and click OK.
Add metrics for multiple Alibaba Cloud accounts
If you log on to the CloudMonitor console with the management account of a resource directory, you can connect the Alibaba Cloud services that are activated for a member account of the resource directory to CloudMonitor. You can use Resource Directory to monitor the metric data of Alibaba Cloud services across enterprise accounts. For information about trusted services in Resource Directory, see Overview.
Add members.
Click Add Account next to All Accounts.
In the Add Account dialog box, select members that you want to add from the Resource Directory Member Account drop-down list and click OK.
Add Alibaba Cloud services.
Click the icon next to the member.
In the Add Product dialog box, select the cloud services that you want to add and click OK.
Add metrics of the Alibaba Cloud services.
Select a cloud service and click Add metric.
In the Add metric dialog box, select the metrics that you want to add and click OK.
Delete metrics of Alibaba Cloud services
You can delete specific Alibaba Cloud services and the corresponding metrics. You can also delete specific metrics of an Alibaba Cloud service.
- Log on to the CloudMonitor console.
In the left-side navigation pane, choose .
Find the namespace that you want to manage and click the icon for account quantity, cloud service quantity, metric quantity, or task quantity in the Metric Data column.
NoteTask quantity indicates the total number of tasks that are used to import metrics from self-managed data centers, AWS, Tencent Cloud, and Prometheus, on-premises log monitoring data, and Simple Log Service log monitoring data.
On the Alibaba Cloud Service Metrics tab of the Metric management panel, delete members, Alibaba Cloud services, and the corresponding metrics.
Delete metrics within an Alibaba Cloud account
Delete Alibaba Cloud services
Delete an Alibaba Cloud service and all related metrics.
In the Current Account directory, move the pointer over an Alibaba Cloud service and click the icon.
In the Confirm deletion dialog box, click Confirm.
Delete specific metrics of an Alibaba Cloud service
In the Current Account directory, click an Alibaba Cloud service, select the metrics that you want to delete, and then click Delete.
In the Tips message, click Confirm.
Delete metrics for multiple Alibaba Cloud accounts
Delete members
Delete a member and all related Alibaba Cloud services and metrics.
Click the icon next to the member.
In the Confirm deletion dialog box, click Confirm.
Delete an Alibaba Cloud service for a member
Delete an Alibaba Cloud service and all related metrics for a member.
In the member directory, move the pointer over an Alibaba Cloud service and click the icon.
In the Confirm deletion dialog box, click Confirm.
Delete specific metrics of an Alibaba Cloud service for a member
In the member directory, click an Alibaba Cloud service, select the metrics that you want to delete, and then click Delete.
In the Tips message, click Confirm.