This topic describes how to create a Prometheus instance to monitor an Elastic Compute Service (ECS) cluster that resides in a virtual private cloud (VPC). This topic also describes how to create a dashboard to view the performance metrics of the ECS cluster.

Prerequisites

Create a Prometheus instance

  1. Log on to the ARMS console .
  2. In the left-side navigation pane, choose Prometheus Monitoring > Prometheus Instances.
  3. In the top navigation bar of the Prometheus Monitoring page, select a region. Then, click Create Prometheus instance in the upper-right corner of the page.
  4. On the Create Prometheus instance page, click Prometheus Instance for VPC.
    In the Integrate ECS Cluster (VPC) panel, all VPCs in the current region are displayed.
  5. In the Integrate ECS Cluster (VPC) panel, click Install in the Actions column of the VPC that you created.
  6. In the Install Prometheus Agent dialog box, enter the VPC name, select a vSwitch and security group, and then click OK.
    • VPC Name: the name of the VPC that you created.
    • vSwitch: Select the vSwitch where the ECS instance to be monitored resides.
    • Security Group: Select the security group to which the ECS instance to be monitored belongs.
    After the Prometheus agent is installed, Installed is displayed in the Status column of the VPC.

Create a dashboard to view the performance metrics of the ECS cluster

After you create a Prometheus instance to monitor the ECS cluster, you can create a Grafana dashboard to view the performance metrics of the ECS cluster.

  1. Log on to the ARMS console .
  2. In the left-side navigation pane, choose Prometheus Monitoring > Prometheus Instances.
  3. In the top navigation bar of the Prometheus Monitoring page, select the region where the Prometheus instance resides.
    The Prometheus Monitoring page displays all the clusters that are monitored by Prometheus Service.
  4. Click the name of the Prometheus instance of the VPC type.
  5. In the upper-right corner of the Dashboards page, click Create Dashboard.
  6. Create a dashboard in the Grafana console based on your business requirements. For more information, see the Grafana documentation.

Stop monitoring the ECS cluster

To stop using Prometheus Service to monitor the ECS cluster, you can perform the following steps to uninstall the Prometheus agent.

  1. Log on to the ARMS console .
  2. In the left-side navigation pane, choose Prometheus Monitoring > Prometheus Instances.
  3. In the top navigation bar of the Prometheus Monitoring page, select a region. Then, click Create Prometheus instance in the upper-right corner of the page.
  4. On the Create Prometheus instance page, click Prometheus Instance for VPC.
  5. In the Integrate ECS Cluster (VPC) panel, click Uninstall in the Actions column of the VPC that you created.
  6. In the Note message, click OK.
    After the Prometheus agent is uninstalled, Uninstalled is displayed in the Status column of the VPC.