All Products
Search
Document Center

Managed Service for Grafana:Add and use a CloudMonitor data source

Last Updated:Jun 05, 2024

By default, the CloudMonitor data source plug-in is installed for Managed Service for Grafana in Application Real-Time Monitoring Service (ARMS). This plug-in allows you to synchronize data from CloudMonitor and display the data in a Grafana dashboard in real time. You do not need to manually obtain or migrate data. This topic describes how to use the CloudMonitor data source plug-in to synchronize data from CloudMonitor and how to use a CloudMonitor data source to create a dashboard panel.

Limits

The CloudMonitor data source plug-in is used to display only the CloudMonitor data in Grafana dashboards. You must manually configure alert rules and customize the dashboards. Therefore, we recommend that you use Managed Service for Prometheus to integrate the monitoring data of Alibaba Cloud services. Managed Service for Prometheus provides multiple out-of-the-box dashboards and alert rules. For more information, see Monitor Alibaba Cloud services.

Step 1: Log on to Grafana

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

  2. 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.

    Note

    You 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.

Add a CloudMonitor data source

Grafana 9.x

  1. In the left-side navigation pane of Grafana, choose image > Add data source.

  2. On the Add data source page, enter CMS Grafana Service in the search box and click the result that appears.

  3. On the Settings tab of the CMS Grafana Service page, configure the parameters that are described in the following table.

    Parameter

    Description

    Name

    The name of the data source. You can use the default name CMS Grafana Service.

    Aliyun UserId

    The ID of your Alibaba Cloud account. You can move the pointer over the avatar in the upper-right corner of the Alibaba Cloud Management Console to view the account ID.

    AccessKeyId

    The AccessKey ID of your Alibaba Cloud account or the RAM user of the Alibaba Cloud account. For information about how to obtain the AccessKey ID, see Obtain an AccessKey pair.

    Note

    The RAM user must be created by the current Alibaba Cloud account and authorized to read data from CloudMonitor.

    AccessKey

    The AccessKey secret of your Alibaba Cloud account or the RAM user of your Alibaba Cloud account. For information about how to obtain the AccessKey secret, see Obtain an AccessKey pair.

    Note

    The RAM user must be created by the current Alibaba Cloud account and authorized to read data from CloudMonitor.

  4. Click Save & test.

    If the Data source is working message appears, the CloudMonitor data source is added to Managed Service for Grafana.

Grafana 10.x

  1. On the Grafana homepage, click the image icon.

  2. In the left-side navigation pane, choose Management > Data sources.

  3. On the Data sources tab, click + Add data source.

  4. On the Add data source page, enter CMS Grafana Service in the search box and click the result that appears.

  5. On the Settings tab of the CMS Grafana Service page, configure the parameters that are described in the following table.

    Parameter

    Description

    Name

    The name of the data source. You can use the default name CMS Grafana Service.

    Aliyun UserId

    The ID of your Alibaba Cloud account. You can move the pointer over the avatar in the upper-right corner of the Alibaba Cloud Management Console to view the account ID.

    AccessKeyId

    The AccessKey ID of your Alibaba Cloud account or the RAM user of the Alibaba Cloud account. For information about how to obtain the AccessKey ID, see Obtain an AccessKey pair.

    Note

    The RAM user must be created by the current Alibaba Cloud account and authorized to read data from CloudMonitor.

    AccessKey

    The AccessKey secret of your Alibaba Cloud account or the RAM user of your Alibaba Cloud account. For information about how to obtain the AccessKey secret, see Obtain an AccessKey pair.

    Note

    The RAM user must be created by the current Alibaba Cloud account and authorized to read data from CloudMonitor.

  6. Click Save & test.

    If the Data source is working message appears, the CloudMonitor data source is added to Managed Service for Grafana.

Create a dashboard panel

After you add a CloudMonitor data source, you can use the data source to create a dashboard panel.

Grafana 9.x

  1. In the left-side navigation pane of Grafana, choose image > New dashboard.

  2. On the New dashboard page, click Add a new panel.

  3. On the Query tab of the Edit Panel page, select CMS Grafana Service from the Data source drop-down list.

  4. In the A section, configure the parameters that are described in the following table.

    Parameter

    Description

    Namespace

    The namespace to which monitoring data is reported. Enter a name in the acs_service name format.

    For more information about the namespaces for different cloud services, see Appendix 1: Metrics.

    Metric

    The name of the monitoring metric whose data is reported.

    For more information about the monitoring metrics for different cloud services, see Appendix 1: Metrics.

    Period

    The interval at which monitoring data is reported. Unit: seconds.

    For more information about the time intervals for different cloud services, see Appendix 1: Metrics.

    Group

    The name and ID of the application group that corresponds to the metric whose data is reported. You can obtain information about the application group on the Application Groups page in the CloudMonitor console. For more information, see Application groups.

    Dimensions

    The dimensions that are used to query the monitoring data of specific resources.

    You can specify multiple dimensions at a time. Specify each dimension as a key-value pair. Example: instanceId:i-2ze2d6j5uhg20x47****.

    For more information about the dimensions for different cloud services, see Appendix 1: Metrics.

    Y-column

    The statistical method that is used to report monitoring data. The available statistical methods include Average, Maximum, Minimum, and Sum.

    For more information about the statistical methods for different cloud services, see Appendix 1: Metrics.

    image

  5. In the right-side pane, specify the name, type, and graph styles of the chart.

  6. Click Apply.

  7. In the upper-right corner, click the 保存监控大盘 icon. Then, specify the name of the dashboard and the directory in which the dashboard resides.

  8. Click Save.

Grafana 10.x

  1. On the Grafana homepage, click the image icon.

  2. In the left-side navigation pane, click Dashboards. On the page that appears, select New dashboard from the New drop-down list.

  3. On the New dashboard page, click + Add visualization.

  4. On the right side of the Select data source page, select CMS Grafana Service as the data source.

  5. In the A section, configure the parameters that are described in the following table.

    Parameter

    Description

    Namespace

    The namespace to which monitoring data is reported. Enter a name in the acs_service name format.

    For more information about the namespaces for different cloud services, see Appendix 1: Metrics.

    Metric

    The name of the monitoring metric whose data is reported.

    For more information about the monitoring metrics for different cloud services, see Appendix 1: Metrics.

    Period

    The interval at which monitoring data is reported. Unit: seconds.

    For more information about the time intervals for different cloud services, see Appendix 1: Metrics.

    Group

    The name and ID of the application group that corresponds to the metric whose data is reported. You can obtain information about the application group on the Application Groups page in the CloudMonitor console. For more information, see Application groups.

    Dimensions

    The dimensions that are used to query the monitoring data of specific resources.

    You can specify multiple dimensions at a time. Specify each dimension as a key-value pair. Example: instanceId:i-2ze2d6j5uhg20x47****.

    For more information about the dimensions for different cloud services, see Appendix 1: Metrics.

    Y-column

    The statistical method that is used to report monitoring data. The available statistical methods include Average, Maximum, Minimum, and Sum.

    For more information about the statistical methods for different cloud services, see Appendix 1: Metrics.

    image

  6. In the right-side pane, specify the name, type, and graph styles of the chart.

  7. Click Apply.

  8. In the upper-right corner, click the 保存监控大盘 icon. Then, specify the name of the dashboard and the directory in which the dashboard resides.

  9. Click Save.

Step 4: View monitoring data

Grafana 9.x

  1. In the left-side navigation pane of Grafana, choose image > Browse.

  2. On the Browse tab, find the directory and click the dashboard to view the charts.

Grafana 10.x

  1. On the Grafana homepage, click the image icon.

  2. In the left-side navigation pane, click Dashboards. Find the directory and click the dashboard to view the charts.