All Products
Search
Document Center

Application Real-Time Monitoring Service:Add and use a Managed Service for Prometheus data source

Last Updated:Mar 11, 2026

Managed Service for Grafana can query metrics directly from a Managed Service for Prometheus instance. After you connect the two services, you can build dashboards and visualize your Prometheus metrics within your Grafana workspace.

Note
  • To add a self-managed Prometheus instance deployed on Alibaba Cloud, see Manage VPC data channels.

  • To add a self-managed Prometheus instance deployed in your own data center, see the Prometheus data source in the Grafana documentation.

Prerequisites

Before you begin, make sure that you have:

  • A Grafana workspace. To create one, see Create a workspace

  • Metrics data in the Managed Service for Prometheus instance you want to connect

Log on to Grafana

  1. Log on to the Application Real-Time Monitoring Service (ARMS) console. In the left-side navigation pane, choose Managed Service for Grafana > Workspace Management.

  2. On the Workspace Management page, find your workspace and click the link in the URL column.

  3. Log on to Grafana with the administrator account and the password you set when you created the workspace.

    Note

    You can also click Sign in with Alibaba Cloud to log on with your current Alibaba Cloud account.

Add the Prometheus data source

The following steps apply to both Grafana 9.0.x and 10.0.x. Version-specific UI differences are noted inline.

  1. Open the data source configuration page.

    • Grafana 9.0.x: In the left-side navigation pane, choose Settings > Add data source.

    • Grafana 10.0.x: Click the Menu icon on the homepage. Choose Management > Data sources, then click + Add new data source.

  2. Search for and select Prometheus.

  3. On the Settings tab, configure the following parameters. Configure other parameters based on your requirements. For all available options, see Prometheus data source in the Grafana documentation.

    ParameterDescription
    NameA display name for this data source. Specify any name that helps you identify it.
    URLThe URL of the Managed Service for Prometheus instance.
  4. Click Save & test. If the message Data source is working appears, the connection is successful. You can now create dashboards using this data source.

Create a dashboard panel

After the data source connection succeeds, create a dashboard panel to visualize your Prometheus metrics.

  1. Create a new dashboard.

    • Grafana 9.0.x: In the left-side navigation pane, choose Dashboards > New dashboard, then click Add a new panel.

    • Grafana 10.0.x: Click the Menu icon on the homepage, click Dashboards, select New dashboard from the New drop-down list, and click + Add visualization.

  2. Select the Prometheus data source you added.

    • Grafana 9.0.x: On the Query tab of the Edit Panel page, select the data source from the Data source drop-down list.

    • Grafana 10.0.x: Select the data source from the Select data source dialog box.

  3. In the A section of the Query tab, set the Metric and Labels parameters, then click Run queries. Grafana 9.0.x: Grafana 10.0.x:

    Query configuration - Grafana 9.0.x

    Query configuration - Grafana 10.0.x

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

  5. Click Apply.

  6. Click the Save icon in the upper-right corner, specify a dashboard name and folder, and click Save.

(Optional) Set up Prometheus Node Exporter

This section walks through setting up Prometheus Node Exporter to collect hardware and OS-level metrics from an Elastic Compute Service (ECS) instance, then building a Grafana dashboard from a community template.

Download and start Node Exporter

  1. Download Prometheus Node Exporter from the official Prometheus website, or run the following command:

    wget https://github.com/prometheus/node_exporter/releases/download/v1.2.0/node_exporter-1.2.0.linux-amd64.tar.gz
  2. Extract the package and start Node Exporter.

  3. Verify that Node Exporter is running by querying its metrics endpoint:

    Note
    • Replace localhost and the port number as needed for your environment.

    • To verify network access from other ECS instances, try accessing http://<ECS-IP>:9100/metrics. If the connection fails, check whether a security group rule is blocking port 9100.

    curl http://localhost:9100/metrics

Register Node Exporter for service discovery

Choose the option that matches your Prometheus deployment:

Managed Service for Prometheus

  1. Log on to the ARMS console. In the left-side navigation pane, choose Managed Service for Prometheus > Instances.

  2. In the top navigation bar, select the region of your Prometheus instance. Click the instance name.

  3. In the left-side navigation pane, click Settings. On the Settings tab, click Edit Prometheus.yaml and add the Node Exporter endpoint.

Self-managed Prometheus instance

Add the Node Exporter target to your prometheus.yml file:

scrape_configs:
    - job_name: 'prometheus'
      static_configs:
      - targets: ['<Node-Exporter-IP>:9100']

Replace <Node-Exporter-IP> with the IP address of the ECS instance running Node Exporter.

Import the Node Exporter dashboard template

After Node Exporter starts reporting metrics, import a pre-built Grafana dashboard template to visualize the data.

  1. Log on to Grafana. See Log on to Grafana.

  2. Open the dashboard import page.

    • Grafana 9.0.x: In the left-side navigation pane, click the Dashboards icon. On the Browse tab of the Dashboards page, click Import.

    • Grafana 10.0.x: Click the Menu icon on the homepage, click Dashboards, click New in the upper-right corner, and select Import.

  3. In the Import via grafana.com input box, enter template ID 12884 and click Load. Grafana 9.0.x: Grafana 10.0.x:

    Import template - Grafana 9.0.x

    Import template - Grafana 10.0.x

  4. In the Options section, configure the following parameters. Grafana 9.0.x: Grafana 10.0.x:

    ParameterDescription
    NameA display name for the dashboard. Specify any name that helps you identify it.
    FolderThe folder in which to store the dashboard.
    Unique identifier (UID)Click Change uid to customize the dashboard UID.
    PrometheusThe Prometheus data source to use with this dashboard.

    Dashboard options - Grafana 9.0.x

    Dashboard options - Grafana 10.0.x

  5. Click Import.

  6. Click the Save icon in the upper-right corner and click Save to save the dashboard.