forked from docs/doc-exports
Reviewed-by: Rumpler, Mihály <mihaly.rumpler@t-systems.com> Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com> Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
10 KiB
10 KiB
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
- Log in to a server as the root user (Linux) or as an administrator (Windows).
- Modify the custom_conf.json file.
- Go to the configuration file directory.
Linux:
cd /usr/local/uniagent/extension/install/telescope/conf
- Open the custom_conf.json file.
vi custom_conf.json
- Enter the following configuration content in {}. Replace metric_name1 and metric_name2 with the metric values in What Metrics Are Supported by the Agent.
"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.
- Go to the configuration file directory.
- Restart the Agent.
- Windows:
- 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.
- 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
- Windows:
Modifying the Configuration File to Disable Metric Collection
- Log in to the server as the root user (Linux) or as an administrator (Windows).
- Modify the custom_conf.json file.
- Go to the configuration file directory.
Linux:
cd /usr/local/uniagent/extension/install/telescope/conf
- Open the custom_conf.json file.
vi custom_conf.json
- Enter the following configuration content in {}. Replace metric_name1 and metric_name2 with the metric values in What Metrics Are Supported by the Agent.
"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.
- Go to the configuration file directory.
- Restart the Agent.
- Windows:
- 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.
- 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
- Windows:
Parent topic: Server Monitoring


