Help Center/ Cloud Eye/ FAQs/ Product Usage/ Server Monitoring/ How Do I Enable or Disable Metric Collection by Modifying the Configuration File?
Updated on 2025-11-14 GMT+08:00

How Do I Enable or Disable Metric Collection by Modifying the Configuration File?

This following describes how to enable or disable metric collection by modifying the configuration file.

Modifying the Configuration File to Enable Metric Collection

  1. Log in to a server as the root user (Linux) or as an administrator (Windows).
  2. Modify the custom_conf.json file.
    1. Go to the configuration file directory.
      Windows:
      cd C:\Program Files\uniagent\extension\install\telescope\conf
      Linux:
      cd /usr/local/uniagent/extension/install/telescope/conf
    2. Open the custom_conf.json file.
      vi custom_conf.json
    3. Enter the following configuration content in {}. Replace metric_name1 and metric_name2 with the metric values in OS Monitoring Metrics Supported by ECSs with the Agent Installed.
      "telescope.metric.metric_name1.enable": "true",
      "telescope.metric.metric_name2.enable": "true"
      Example: Figure 1 shows the configuration content for enabling metric collection for cpu_usage and cpu_usage_idle.
      Figure 1 Enabling metric collection for cpu_usage and cpu_usage_idle
  3. Restart the Agent.
    • Windows:
      1. In the C:\Program Files\uniagent\extension\install\telescope directory, double-click shutdown.bat to stop the Agent, and then run start.bat to start the Agent.
      2. In the C:\Program Files\uniagent\script directory, double-click shutdown.bat to stop the Agent, and then run start.bat to start the Agent.
    • Linux:
      service ces-uniagent stop
      service ces-uniagent start
      /usr/local/uniagent/extension/install/telescope/telescoped restart

Modifying the Configuration File to Disable Metric Collection

  1. Log in to the server as the root user (Linux) or as an administrator (Windows).
  2. Modify the custom_conf.json file.
    1. Go to the configuration file directory.
      Windows:
      cd C:\Program Files\uniagent\extension\install\telescope\conf
      Linux:
      cd /usr/local/uniagent/extension/install/telescope/conf
    2. Open the custom_conf.json file.
      vi custom_conf.json
    3. Enter the following configuration content in {}. Replace metric_name1 and metric_name2 with the metric values in OS Monitoring Metrics Supported by ECSs with the Agent Installed.
      "telescope.metric.metric_name1.enable": "false",
      "telescope.metric.metric_name2.enable": "false"
      Example: Figure 2 shows the configuration content for disabling metric collection for cpu_usage and cpu_usage_idle.
      Figure 2 Disabling metric collection for cpu_usage and cpu_usage_idle
  3. Restart the Agent.
    • Windows:
      1. In the C:\Program Files\uniagent\extension\install\telescope directory, double-click shutdown.bat to stop the Agent, and then run start.bat to start the Agent.
      2. In the C:\Program Files\uniagent\script directory, double-click shutdown.bat to stop the Agent, and then run start.bat to start the Agent.
    • Linux:
      service ces-uniagent stop
      service ces-uniagent start
      /usr/local/uniagent/extension/install/telescope/telescoped restart