All Products
Search
Document Center

Elastic Container Instance:Monitor disks with Prometheus

Last Updated:Dec 02, 2025

When you create an Elastic Container Instance (ECI) pod in a Kubernetes cluster, the ECI pod runs on a virtual node. Because there are no real nodes, disks are associated with pods instead of nodes. Therefore, you must configure pod-level disk monitoring to track disk-related metrics. This topic describes how to use Application Real-Time Monitoring Service (ARMS) Prometheus to monitor disks for ECI pods and how to customize a disk monitoring dashboard in Grafana.

Prerequisites

  • You have created an ACK Serverless cluster and connected it to ARMS Prometheus for monitoring. For more information, see Connect to Prometheus Monitoring.

  • You have created a Grafana workspace that is not a shared version, completed data migration, and integrated Alibaba Cloud services. For more information, see Create a Grafana workspace and Integrate Alibaba Cloud services.

    Important
    • By default, the Grafana workspace that is used when you connect to ARMS Prometheus is a shared version. Shared versions do not support custom dashboards.

    • The steps in this topic use Grafana 10.0.X as an example. If you use a different version, you may need to adjust the steps accordingly.

Procedure

  1. Log on to the ARMS console.

  2. Open the Grafana page.

    1. In the navigation pane on the left, choose Managed Service for Grafana > Workspace Management.

    2. Find the target workspace and click the URL in the URL column to open the Grafana logon page.

  3. Enter your account information and log on to Grafana.

    You can log on to Grafana using the admin account and the password that you set when you created the workspace, or you can use another account.

  4. In the upper-left corner of the Grafana page, click the grafana-1.png icon and then click Dashboards in the navigation bar.

  5. In the upper-right corner of the Dashboards page, click New and select Import.

  6. Click Upload dashboard JSON file and select the JSON file.

    The JSON file contains the dashboard configuration. Sample file: ECI_Pod_Disk.

  7. Set the dashboard folder and data source to the target cluster.

    grafana-2.png

  8. Click Import.

    After the import is complete, you can view the disk monitoring information for the ECI pods in the new disk monitoring dashboard.

    监控磁盘.png

  9. (Optional) To filter and view monitoring data at the deployment or StatefulSet level, you can copy the relevant panel from the current disk monitoring dashboard to a deployment or StatefulSet dashboard. Alternatively, you can modify the settings directly on the current dashboard.

    To add a filter variable, modify the dashboard settings as follows:

    1. In the disk monitoring dashboard on the Grafana page, click the 设置 icon in the upper-right corner.

    2. On the Settings page, in the navigation pane on the left, click Variables.

    3. Click New variable, configure the General and Query Options, and then click Apply.

      When you add a variable, set the Query based on the required variable type. The following table provides examples.

      Type

      Query Type

      Label *

      Metric

      deployment

      Label_values

      deployment

      kube_deployment_created{namespace=~"$namespace"}

      statefulset

      Label_values

      statefulset

      kube_statefulset_created{namespace=~"$namespace"}

      The following figure shows an example of adding a deployment variable.

      监控磁盘0.png

    4. Click the pod variable, modify the query, and then click Apply.

      Modify the query for the pod variable based on the variable type that you added in the previous step. The following table provides examples.

      Type

      Query Type

      Query

      deployment

      Query_result

      kube_pod_info{namespace=~'$namespace',pod=~"$deployment.*"} >= 1

      statefulset

      Query_result

      kube_pod_info{namespace=~'$namespace',pod=~"$statefulset.*"} >= 1

      The following figure shows an example of modifying the query for the pod variable for a deployment.

      监控磁盘00.png

    5. Adjust the order of the variables so that the deployment (or StatefulSet) variable is above the pod variable.

      Note

      Click and drag the grafana-5.png icon to move the variable.

      监控磁盘1.png

    6. In the upper-right corner, click Save dashboard. Enter a description and click Save.

    7. Return to the disk monitoring dashboard to verify that the filter feature is working correctly.

      The following figure shows an example where the deployment-level filter is active.

      监控磁盘2.png