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 Managed Service for Prometheus. For more information, see Create a Prometheus instance to monitor an ACK cluster.

Procedure

  1. Log on to the ARMS console.
  2. In the left-side navigation pane, choose Prometheus Service > Prometheus Instances.
  3. In the top navigation bar, select the region where your Prometheus instance is deployed.
  4. On the Prometheus Service page, click the name of the Prometheus instance that you want to manage.
  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.

45

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. For more information, see Configure a data collection rule for Prometheus Monitoring.
  • 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 Managed Service for Prometheus. 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.

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