All Products
Search
Document Center

Cloud Monitor:View metrics in self-managed Grafana

Last Updated:Jun 03, 2026

Hybrid Cloud Monitoring integrates with Grafana through built-in dashboards and a Grafana plug-in. You can also connect a self-managed Grafana instance to visualize metric data.

Prerequisites

Hybrid Cloud Monitoring is enabled. Enable Hybrid Cloud Monitoring.

Background information

Cloud Monitor supports other Grafana integration methods. Overview.

Procedure

  1. Install the Grafana software.
    Note The following example demonstrates how to install Grafana on CentOS. For more information about how to install Grafana on other operating systems, see Install Grafana.
    1. Log on to the server as the root user.
    2. Run one of the following commands to install Grafana.
      Note For more information about the software versions of Grafana and the operating systems supported by Grafana, visit the Grafana download page. In the following example, the Grafana installation package is grafana-8.0.6-1.x86_64.rpm, which is the latest version.
      • Method 1:

        sudo yum install https://dl.grafana.com/oss/release/grafana-8.0.6-1.x86_64.rpm

      • Method 2:

        wget https://dl.grafana.com/oss/release/grafana-8.0.6-1.x86_64.rpm

        sudo yum localinstall grafana-8.0.6-1.x86_64.rpm

    3. Run the following command to start the Grafana service:
      sudo service grafana-server start
  2. Optional. Install Grafana panel plug-ins.

    If you need to view the monitoring data on a Grafana panel, such as Pie Chart, Gantt, or Worldmap Panel, you must install the corresponding panel plug-in. For more information about how to install Grafana panel plug-ins, visit the Grafana panel plug-in page.

  3. Create a namespace in Hybrid Cloud Monitoring.

  4. Create a metric import task.

  5. Obtain the URL and account credentials.

    Note

    You need the URL and credentials from this step to create a data source in Step 6.

    1. Log on to the Cloud Monitor console.

    2. In the left-side navigation pane, choose Hybrid Cloud Monitoring > Namespace.

    3. Find the target namespace and choose Integrate Other Visualization Solutions > Integrate Self-managed Grafana in the Actions column.

      The following table describes the connection parameters.

      Parameter

      Description

      Example

      URL

      URL for connecting the namespace to Grafana.

      Format: <Endpoint for reporting metric data>/proxy/namespace/<Namespace Name>.

      For cross-region monitoring, use endpoints in China (Hangzhou), China (Shanghai), China (Beijing), and China (Shenzhen) regions:

      • Public endpoint

        Internet endpoints in China (Hangzhou), China (Shanghai), China (Beijing), and China (Shenzhen).

        • https://metrichub-cms-cn-shanghai.aliyuncs.com

        • https://metrichub-cms-cn-hangzhou.aliyuncs.com

        • https://metrichub-cms-cn-beijing.aliyuncs.com

        • https://metrichub-cms-cn-shenzhen.aliyuncs.com

      • VPC endpoint

        VPC endpoints in China (Hangzhou), China (Shanghai), China (Beijing), and China (Shenzhen).

        • http://metrichub-cn-shanghai.aliyun.com

        • http://metrichub-cn-hangzhou.aliyun.com

        • http://metrichub-cn-beijing.aliyun.com

        • http://metrichub-cn-shenzhen.aliyun.com

      Note

      These endpoints offer lower latency. Full endpoint list: Appendix 2: Endpoints for reporting metric data.

      https://metrichub-cms-cn-hangzhou.aliyuncs.com/proxy/namespace/default-aliyun

      User

      AccessKey ID of your Alibaba Cloud account or RAM user. Obtain an AccessKey pair.

      Note

      The RAM user must belong to your Alibaba Cloud account and have Cloud Monitor read permissions.

      yourAccessKeyID

      Password

      AccessKey Secret of your Alibaba Cloud account or RAM user. Obtain an AccessKey pair.

      Note

      The RAM user must belong to your Alibaba Cloud account and have Cloud Monitor read permissions.

      yourAccessKeySecret

      Important
      • The AccessKey pair of an Alibaba Cloud account can be used to call all API operations. We recommend that you use a RAM user to call API operations or perform routine O&M. Keep your AccessKey pair confidential.

      • We recommend that you do not include your AccessKey pair in files that are easily accessible to others, such as the project code. Otherwise, your AccessKey pair may be leaked and resources in your account become insecure.

  6. Create a data source.

    Grafana defaults to port 3000 with the username admin.

    Important

    Change the default password on your first login.

    1. Log in to Grafana.

      Login URL format: http://<Grafana server IP address>:3000. Example: http://192.168.XX.XX:3000.

    2. In the left-side navigation pane, click Configuration.

    3. On the Data Sources tab, click Add data source in the upper-right corner.

    4. On the Add data source page, click Prometheus.

    5. On the Settings tab, configure Name, URL, User, and Password. Keep defaults for other parameters.

      • Name: Data source name. Example: Prometheus-test.

      • URL: Namespace connection URL from Step 5. Example: https://metrichub-cms-cn-hangzhou.aliyuncs.com/proxy/namespace/default-aliyun.

      • User and Password: Use the User and Password from Step 5, for example, yourAccessKeyID and yourAccessKeySecret.

        Note

        These fields appear in Basic Auth Details after you enable Basic auth in the Auth section.

    6. Click Save & Test.

  7. Add a dashboard and chart.

    1. In the left-side navigation pane, click the Create icon.

    2. On the New dashboard page, click Add an empty panel.

    3. On the Query tab, select Prometheus-test from the Data source drop-down list, and then select the target cloud service metrics.

    4. In the right-side pane, configure the chart name, type, and style.

    5. In the upper-right corner, click Apply.

    6. In the upper-right corner, click the Save dashboard icon, and then set a name and folder for the dashboard.

    7. Click Save.

  8. View monitoring data.
    1. In the left-side navigation pane, choose Dashboard > Manage.
    2. On the Manage tab, click the dashboard.
      View all monitoring charts on the dashboard.