Installing the Plug-in for Collecting GPU and RAID Metrics (Linux)
Scenarios
This topic describes how to install the plug-in to collect ECS GPU and BMS RAID metrics.
- ECSs support GPU metrics while BMSs do not.
- BMSs support RAID metrics while ECSs do not.
- If the Agent is upgraded to 1.0.5 or later, the corresponding plug-in must use the latest version. Otherwise, the metric collection will fail.
Prerequisites
- The Agent has been installed and is running properly.
- GPU metric collection requires ECSs to support GPU.
- Run the following command to check the Agent version:
if [[ -f /usr/local/uniagent/extension/install/telescope/bin/telescope ]]; then /usr/local/uniagent/extension/install/telescope/bin/telescope -v; else echo 0; fi
- If 0 is returned, the old Agent is used.
- If other values are returned, the new Agent is used.
Procedure
- Log in to an ECS as user root.
- To monitor the BMS software RAID metrics, log in to a BMS.
- The examples in the following procedure are based on the GPU plug-in installation. The installation for the software RAID plug-in is similar.
- Run the following command to go to the Agent installation path /usr/local/telescope:
Old Agent:
cd /usr/local/telescope
New Agent:
cd /usr/local/uniagent/extension/install/telescope
- Run the following command to create the plugins folder:
mkdir plugins
- Run the following command to enter the plugins folder:
cd plugins
- To download the script of the GPU metric collection plug-in, run the following command:
wget https://telescope.obs.cn-north-1.myhuaweicloud.com/gpu_collector
- Run the following command to add the script execution permissions:
- Run the following command to create the conf.json file, add the configuration content, and configure the plug-in path and metric collection period crontime, which is measured in seconds:
vi conf.json
Configuring the GPU metric plug-in old Telescope
{ "plugins": [ { "path": "/usr/local/telescope/plugins/gpu_collector", "crontime": 60 } ] }Configuring the GPU metric plug-in (new Telescope)
{ "plugins": [ { "path": "/usr/local/uniagent/extension/install/telescope/plugins/gpu_collector", "crontime": 60 } ] }Configuring the RAID metric plug-in (old Telescope)
{ "plugins": [ { "path": "/usr/local/telescope/plugins/raid_monitor.sh", "crontime": 60 } ] }Configuring the RAID metric plug-in (new Telescope)
{ "plugins": [ { "path": "/usr/local/uniagent/extension/install/telescope/plugins/raid_monitor.sh", "crontime": 60 } ] }
- The parameters gpu_collector and raid_monitor.sh indicate the GPU plug-in and RAID plug-in configuration.
- The collection period of the plug-in is 60 seconds. If the collection period is incorrectly configured, the metric collection will be abnormal.
- Do not change the plug-in path without permission. Otherwise, the GPU metric collection will be abnormal.
- Open the conf_ces.json file in the /usr/local/telescope/bin directory. Add "EnablePlugin": true to the file to enable the metric collection function of the plug-in.
The path of the new Telescope is /usr/local/uniagent/extension/install/telescope/bin.
{ "Endpoint": "Region address. Retain the default value.", "EnablePlugin": true } - Restart the Agent:
/usr/local/telescope/telescoped restart
New Telescope:
ps -ef | grep telescope | grep -v grep | awk '{print $2}' | xargs kill -9
Last Article: Managing the Agent (Windows)
Next Article: Installing the Direct Connect Metric Collection Plug-ins
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.