In Application Real-Time Monitoring Service (ARMS), Managed Service for Grafana includes the CloudMonitor data source plugin by default. This plugin lets you synchronize and display CloudMonitor data on Grafana dashboards in real time, without needing to manually migrate data. This topic shows you how to use the CloudMonitor data source plugin to create a dashboard panel.
Limitations
The CloudMonitor data source plugin can only be used to display CloudMonitor data in Grafana dashboards. You cannot use it to configure alert rules and must also create custom dashboards for your cloud products. Therefore, we recommend that you use Alibaba Cloud Managed Service for Prometheus to access cloud product monitoring data. Alibaba Cloud Managed Service for Prometheus provides multiple out-of-the-box dashboards and alert rules. For more information, see Cloud Service Observability.
Step 1: Log on to Grafana
-
Log on to the ARMS console. In the left-side navigation pane, choose .
-
On the Workspace Management page, find the workspace that you want to manage and click the URL in the URL column to go to Grafana.
NoteYou can log on to Grafana with the administrator account of Grafana and the password that you configured when you created the workspace. You can also click Sign in with Alibaba Cloud to log on to Grafana with the current Alibaba Cloud account.
Step 2: Add the CMS Grafana Service data source
Grafana 9.x
-
In the left-side navigation pane of Grafana, choose
> Add data source. -
On the Add data source page, search for and click CMS Grafana Service.
-
On the CMS Grafana Service page, on the Settings tab, configure the following parameters.
Parameter
Description
Name
The name of the data source. You can use the default name CMS Grafana Service.
Aliyun UserId
Your Alibaba Cloud account ID. To find it, hover over your profile picture in the upper-right corner of the Alibaba Cloud console.
AccessKeyId
The AccessKey ID for your Alibaba Cloud account or a RAM user. For help, see Obtain an AccessKey pair.
NoteThe RAM user must be created under the current Alibaba Cloud account and have permissions to read CloudMonitor data.
AccessKey
The AccessKey Secret for your Alibaba Cloud account or a RAM user. For help, see Obtain an AccessKey pair.
NoteThe RAM user must be created under the current Alibaba Cloud account and have permissions to read CloudMonitor data.
-
Click Save & Test.
The message
Data source is workingconfirms that the CloudMonitor data source was added successfully.
Grafana 10.x
-
On the Grafana homepage, click the
icon. -
In the left-side navigation pane, choose .
-
On the Data sources tab, click + Add data source.
-
On the Add data source page, search for and click CMS Grafana Service.
-
On the CMS Grafana Service page, on the Settings tab, configure the following parameters.
Parameter
Description
Name
The name of the data source. You can use the default name CMS Grafana Service.
Aliyun UserId
Your Alibaba Cloud account ID. To find it, hover over your profile picture in the upper-right corner of the Alibaba Cloud console.
AccessKeyId
The AccessKey ID for your Alibaba Cloud account or a RAM user. For help, see Obtain an AccessKey pair.
NoteThe RAM user must be created under the current Alibaba Cloud account and have permissions to read CloudMonitor data.
AccessKey
The AccessKey Secret for your Alibaba Cloud account or a RAM user. For help, see Obtain an AccessKey pair.
NoteThe RAM user must be created under the current Alibaba Cloud account and have permissions to read CloudMonitor data.
-
Click Save & Test.
The message
Data source is workingconfirms that the CloudMonitor data source was added successfully.
Step 3: Create a dashboard panel
After adding the CloudMonitor data source, you can use it to create dashboard panels.
Grafana 9.x
-
In the left-side navigation pane of Grafana, choose
> New dashboard. -
On the New dashboard page, click Add a new panel.
-
On the Query tab of the Edit Panel page, select CMS Grafana Service from the Data source drop-down list.
-
In query editor A, configure the following parameters.
Parameter
Description
Namespace
The namespace for the cloud service. The format is
acs_CloudServiceName.For more information about the namespaces of cloud services, see Metrics for cloud services.
Metric
The metric to monitor.
For more information about the metrics of cloud services, see Metrics for cloud services.
Period
The data reporting interval, in seconds.
For more information about the periods of cloud services, see Metrics for cloud services.
Group
The name and ID of the Application Group that corresponds to the selected Metric. You can obtain this information from the Application Group page on the CloudMonitor console. For more information, see Application groups.
Dimensions
The dimensions for querying data from a specific resource, specified as a map of key-value pairs.
Example:
instanceId:i-2ze2d6j5uhg20x47****. You can select multiple dimensions.For more information about the dimensions of cloud services, see Metrics for cloud services.
Y-column
The method for aggregating monitoring data, such as Average, Maximum, Minimum, or Sum.
For more information about the statistical methods of cloud services, see Metrics for cloud services.
-
In the right-side pane, specify the name, type, and graph styles of the chart.
-
Click Apply.
-
In the upper-right corner, click the
icon. Then, specify the name of the dashboard and the directory in which the dashboard resides. -
Click Save.
Grafana 10.x
-
On the Grafana homepage, click the
icon. -
In the left-side navigation pane, click Dashboards. On the page that appears, select New dashboard from the New drop-down list.
-
On the New dashboard page, click + Add visualization.
-
In the Select data source dialog box, select the CMS Grafana Service data source.
-
In query editor A, configure the following parameters.
Parameter
Description
Namespace
The namespace for the cloud service. The format is
acs_CloudServiceName.For more information about the namespaces of cloud services, see Metrics for cloud services.
Metric
The metric to monitor.
For more information about the metrics of cloud services, see Metrics for cloud services.
Period
The data reporting interval, in seconds.
For more information about the periods of cloud services, see Metrics for cloud services.
Group
The name and ID of the Application Group that corresponds to the selected Metric. You can obtain this information from the Application Group page on the CloudMonitor console. For more information, see Application groups.
Dimensions
The dimensions for querying data from a specific resource, specified as a map of key-value pairs.
Example:
instanceId:i-2ze2d6j5uhg20x47****. You can select multiple dimensions.For more information about the dimensions of cloud services, see Metrics for cloud services.
Y-column
The method for aggregating monitoring data, such as Average, Maximum, Minimum, or Sum.
For more information about the statistical methods of cloud services, see Metrics for cloud services.
Set Format to
timeserieand X-column totimestamp. A time-series line chart for the metric is then displayed above the panel. -
In the right-side pane, specify the name, type, and graph styles of the chart.
-
Click Apply.
-
In the upper-right corner, click the
icon. Then, specify the name of the dashboard and the directory in which the dashboard resides. -
Click Save.
Step 4: View monitoring data
Grafana 9.x
-
In the left-side navigation pane of Grafana, choose
> Browse. -
On the Browse tab, find the directory and click the dashboard to view the charts.
Grafana 10.x
-
On the Grafana homepage, click the
icon. -
In the left-side navigation pane, click Dashboards. Find the directory and click the dashboard to view the charts.