You can view the basic information and health check results of a Prometheus agent, set the number of agent replicas, and restart the agent on the Settings tab of the Settings page.

Prerequisites

Your service is monitored by Prometheus Service. For more information, see Connect an ACK cluster to Prometheus Service.

Procedure

  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, select the region where your Prometheus instance is deployed.
  4. On the Prometheus Monitoring page, click the name of the Prometheus instance that is used to monitor your Container Service for Kubernetes (ACK) cluster.
  5. In the left-side navigation pane, click Settings. On the page that appears, click the Settings tab.

View a Prometheus agent

In the Prometheus Agent section of the Settings tab, you can view the status, version, Helm version, and number of replicas of the Prometheus agent.

scv

In the Prometheus Agent section of the Settings tab, you can perform the following operations:

  • In the upper-right corner of the Prometheus Agent section, click Edit Prometheus.yaml to update the Prometheus.yaml file.
  • In the upper-right corner of the Prometheus Agent section, click Edit RecordingRule.yaml to update the RecordingRule.yaml file. For more information, see Modify the RecordingRule.yaml file.

    You need to configure rule groups in the RecordingRule.yaml file of Prometheus Service. You cannot configure remote write for the recording rules in the RecordingRule.yaml file. Sample configurations:

    groups:
      - name: cpu-node
        interval: 30s
        rules:
          - expr: avg by (job, instance, mode) (rate(apiserver_request_total[5m]))
            record: job_instance_mode:apiserver_request_total:avg_rate5m
  • Click Upgrade in the Helm Version section. In the dialog box that appears, click OK to upgrade the Helm version. For more information, see Helm versions.
  • Click Restart in the Actions column to restart the agent.

    After the agent is restarted, the Execution Result dialog box appears.

  • Click Replicas in the Actions column. In the Set Agent Replicas dialog box, set the number of agent replicas and click OK. ax
  • Click Health Check in the Actions column. In the Health Check Result dialog box, view the health check result of the agent. sc
  • Click Agent Logs in the Actions column. In the dialog box that appears, view the agent logs. Agent logs