(Optional) Manually Configuring the Agent
You can configure the AK/SK, region ID, and project ID with a few clicks. By clicking Configure, temporary AK/SK authorization will be performed for Agents installed on all ECSs or BMSs in the region. Any new ECSs or BMSs created there will automatically get this authorization. If the Agent fails to be configured by clicking Configure or due to other reasons, manually configure it by following the instructions provided in this topic.
When manually configuring the Agent, you need to use an AK/SK pair for authentication. Storing the AK and SK in plaintext has high security risks. You are advised to click Configure to grant Agent permissions for all ECSs or BMSs in the region. For details, see Granting Agent Permissions for Servers by Clicking Configure.
Constraints
You can only install the Agent on Linux or Windows servers. For details, see What OSs Does the Agent Support?
Prerequisites
The Agent has been installed. For details, see Installing the Agent.
Linux OSs
Checking the version of the Agent in use
- Log in to an ECS as user root.
- You have checked the Agent version using the following command:
if [[ -f /usr/local/uniagent/extension/install/telescope/bin/telescope ]]; then /usr/local/uniagent/extension/install/telescope/bin/telescope -v; elif [[ -f /usr/local/telescope/bin/telescope ]]; then echo "old agent"; else echo 0; fi
- If old agent is returned, the old version of the Agent is used. You need to modify the configuration files of telescope and the metric collection module of Cloud Eye. For details, see Manually Configuring the Agent (Earlier Version).
- If a version is returned, the new version of the Agent is used. You need to modify the configuration files of uniagent and telescope to ensure that the parameter values are the same. For details, see Manually Configuring the Agent (New Version).
- If 0 is returned, the Agent is not installed. Install it by referring to Installing the Agent.
- Log in to the server as user root.
- Modify the telescope configuration file conf.json.
vi /usr/local/uniagent/extension/install/telescope/bin/conf.json
Modify the parameter settings in the file. For details, see Table 1.Figure 1 Modifying the conf.json configuration file for the ECS
ECS parameters{ "InstanceId":"", "ProjectId": "", "AccessKey": "XXXXXXXXXXXXXXXXXXXX", "SecretKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "RegionId": "ap-southeast-1", "ClientPort": 0, "PortNum": 200 }BMS parameters
{ "InstanceId":"", "ProjectId": "", "AccessKey": "XXXXXXXXXXXXXXXXXXXX", "SecretKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "RegionId": "ap-southeast-1", "ClientPort": 0, "PortNum": 200, "BmsFlag": true }Table 1 Public parameters Parameter
Description
InstanceId
Instance ID. This parameter is left blank by default, indicating that the instance ID of the current server is specified. Retain the default value. To change the value, log in to the Cloud Eye console and choose Server Monitoring in the navigation pane.
NOTE:When configuring the instance ID, comply with the following rules:
- The instance ID must be unique, that is, in the same region, InstanceId used by the Agent cannot be the same, or errors may occur.
- The InstanceId value must be consistent with the actual ECS or BMS ID. Otherwise, you cannot see the OS monitoring data on Cloud Eye.
ProjectId
Project ID. This parameter is left blank by default, indicating that the project ID of the current server is specified. Retain the default value. If you need to configure it, obtain the project ID as follows:
- Log in to the Cloud Eye console.
- Move the cursor to the username in the upper right corner and choose My Credentials from the Basic Information dialog box.
- Under Projects, obtain the project ID for the region where the ECS or BMS is located.
AccessKey/SecretKey
Access key (AK) and secret key (SK). To obtain them:
- Log in to the Cloud Eye console.
- Move the cursor to the username in the upper right corner and choose My Credentials from the Basic Information dialog box.
- In the navigation pane, choose Access Keys.
- If you have obtained the access key, obtain the AccessKey value and the SecretKey value in the credentials.csv file saved after you create the access key.
- If no access keys are available, click Create Access Key to create one. Save the credentials.csv file and obtain the AccessKey value and the SecretKey value in it. NOTICE:
- For security purposes, use an IAM username with the CES Administrator and LTS Administrator permissions. For details, see Creating a User Group and Assigning Permissions and Creating an IAM User and Logging In.
- The configured access key must be in the Access Keys list on the My Credentials page, or its authentication will fail and you cannot view OS monitoring data on Cloud Eye.
RegionId
Region ID. For example, if the ECS or BMS is located in the CN-Hong Kong region, RegionId is ap-southeast-1. For IDs of other regions, see Regions and Endpoints.
ClientPort
Start port number used by the Agent.
NOTE:The default value is 0, indicating that the Agent will randomly use an available port. Ports 1 to 1023 are reserved. You are advised not to specify a port in this range for the Agent.
PortNum
Number of ports configured for the Agent.
NOTE:The default value is 200. If ClientPort is set to 5000, the Agent will use ports in the range port 5000 to 5199.
BmsFlag
Set this parameter to true for a BMS. This parameter is not required by an ECS.
You do not need to set this parameter for the Windows OS.
- Modify the conf.json configuration file in the uniagent directory by referring to Table 1.
vi /usr/local/uniagent/conf/conf.json
- After the configuration is complete, log in to the Server Monitoring page. If the Agent status is Running, the Agent has been installed and started to collect fine-grained metrics.
After you configure the Agent, its status is still displayed as Not installed because no monitoring data is reported yet. Wait for 3 to 5 minutes and refresh the page.
- Log in to the server as user root.
- Go to the bin directory under the Agent installation path.
cd /usr/local/telescope/bin
- Modify the conf.json configuration file.
- Run the following command to open conf.json:
vi conf.json
- Modify the parameter settings in the file. For details, see Table 2. Figure 2 Modifying the conf.json configuration file for the ECS
ECS parameters{ "InstanceId":"", "ProjectId": "", "AccessKey": "XXXXXXXXXXXXXXXXXXXX", "SecretKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "RegionId": "ap-southeast-1", "ClientPort": 0, "PortNum": 200 }BMS parameters
{ "InstanceId":"", "ProjectId": "", "AccessKey": "XXXXXXXXXXXXXXXXXXXX", "SecretKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "RegionId": "ap-southeast-1", "ClientPort": 0, "PortNum": 200, "BmsFlag": true }Table 2 Public parameters Parameter
Description
InstanceId
Instance ID. This parameter is left blank by default, indicating that the instance ID of the current server is specified. Retain the default value. To change the value, log in to the Cloud Eye console and choose Server Monitoring in the navigation pane.
NOTE:When configuring the instance ID, comply with the following rules:
- The instance ID must be unique, that is, in the same region, InstanceId used by the Agent cannot be the same, or errors may occur.
- The InstanceId value must be consistent with the actual ECS or BMS ID. Otherwise, you cannot see the OS monitoring data on Cloud Eye.
ProjectId
Project ID. This parameter is left blank by default, indicating that the project ID of the current server is specified. Retain the default value. If you need to configure it, obtain the project ID as follows:
- Log in to the Cloud Eye console.
- Move the cursor to the username in the upper right corner and choose My Credentials from the Basic Information dialog box.
- Under Projects, obtain the project ID for the region where the ECS or BMS is located.
AccessKey/SecretKey
Access key (AK) and secret key (SK). To obtain them:
- Log in to the Cloud Eye console.
- Move the cursor to the username in the upper right corner and choose My Credentials from the Basic Information dialog box.
- In the navigation pane, choose Access Keys.
- If you have obtained the access key, obtain the AccessKey value and the SecretKey value in the credentials.csv file saved after you create the access key.
- If no access keys are available, click Create Access Key to create one. Save the credentials.csv file and obtain the AccessKey value and the SecretKey value in it. NOTICE:
- For security purposes, use an IAM username with the CES Administrator and LTS Administrator permissions. For details, see Creating a User Group and Assigning Permissions and Creating an IAM User and Logging In.
- The configured access key must be in the Access Keys list on the My Credentials page, or its authentication will fail and you cannot view OS monitoring data on Cloud Eye.
RegionId
Region ID. For example, if the ECS or BMS is located in the CN-Hong Kong region, RegionId is ap-southeast-1. For IDs of other regions, see Regions and Endpoints.
ClientPort
Start port number used by the Agent.
NOTE:The default value is 0, indicating that the Agent will randomly use an available port. Ports 1 to 1023 are reserved. You are advised not to specify a port in this range for the Agent.
PortNum
Number of ports configured for the Agent.
NOTE:The default value is 200. If ClientPort is set to 5000, the Agent will use ports in the range port 5000 to 5199.
BmsFlag
Set this parameter to true for a BMS. This parameter is not required by an ECS.
You do not need to set this parameter for the Windows OS.
- Run the following command to open conf.json:
- Modify the conf_ces.json configuration file for the Cloud Eye metric collection module.
- Run the following command to open public configuration file conf_ces.json:
vi conf_ces.json
- Modify the parameter in conf_ces.json and save it. For details, see Table 3.
{ "Endpoint": "https://ces.ap-southeast-1.myhuaweicloud.com" }Table 3 Parameter of the metric collection module Parameter
Description
Endpoint
Cloud Eye endpoint URL in the region where the ECS or BMS is located. For example, if the ECS or BMS is in the CN-Hong Kong region, Endpoint is ces.ap-southeast-1.myhuaweicloud.com. For the endpoint values of other regions, see Regions and Endpoints.
- Run the following command to open public configuration file conf_ces.json:
- After the configuration is complete, log in to the Server Monitoring page. If the Agent status is Running, the Agent has been installed and started to collect fine-grained metrics.
After you configure the Agent, its status is still displayed as Not installed because no monitoring data is reported yet. Wait for 3 to 5 minutes and refresh the page.
Windows OSs
Checking the version of the Agent in use
- Log in to the ECS as an administrator.
- Check the installation path and the Agent version.
- For the Agent of the earlier version, the installation path is C:\Program Files\telescope. For details about how to manually configure the Agent, see Manually Configuring the Agent (Earlier Version). You need to modify the configuration files of telescope and the metric collection module of Cloud Eye.
- For the Agent of the new version, the installation path is C:\Program Files\uniagent\extension\install\telescope. For details about how to manually configure the Agent, see Manually Configuring the Agent (New Version). You need to modify the configuration files of uniagent and telescope to ensure that the parameter values are the same.
- Log in to the ECS as an administrator.
- Open the conf.json file in the C:\Program Files\uniagent\extension\install\telescope\bin folder.
- Configure the following parameters. For details, see Table 4. Figure 3 Modifying the conf.json configuration file for the ECS
{ "InstanceId":"", "ProjectId": "", "AccessKey": "XXXXXXXXXXXXXXXXXXXX", "SecretKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "RegionId": "ap-southeast-1", "ClientPort": 0, "PortNum": 200 }Table 4 Public parameters Parameter
Description
InstanceId
Instance ID. This parameter is left blank by default, indicating that the instance ID of the current server is specified. Retain the default value. To change the value, log in to the Cloud Eye console and choose Server Monitoring in the navigation pane.
NOTE:When configuring the instance ID, comply with the following rules:
- The instance ID must be unique, that is, in the same region, InstanceId used by the Agent cannot be the same, or errors may occur.
- The InstanceId value must be consistent with the actual ECS or BMS ID. Otherwise, you cannot see the OS monitoring data on Cloud Eye.
ProjectId
Project ID. This parameter is left blank by default, indicating that the project ID of the current server is specified. Retain the default value. If you need to configure it, obtain the project ID as follows:
- Log in to the Cloud Eye console.
- Move the cursor to the username in the upper right corner and choose My Credentials from the Basic Information dialog box.
- Under Projects, obtain the project ID for the region where the ECS or BMS is located.
AccessKey/SecretKey
Access key (AK) and secret key (SK). To obtain them:
- Log in to the Cloud Eye console.
- Move the cursor to the username in the upper right corner and choose My Credentials from the Basic Information dialog box.
- In the navigation pane, choose Access Keys.
- If you have obtained the access key, obtain the AccessKey value and the SecretKey value in the credentials.csv file saved after you create the access key.
- If no access keys are available, click Create Access Key to create one. Save the credentials.csv file and obtain the AccessKey value and the SecretKey value in it. NOTICE:
- For security purposes, use an IAM username with the CES Administrator and LTS Administrator permissions. For details, see Creating a User Group and Assigning Permissions and Creating an IAM User and Logging In.
- The configured access key must be in the Access Keys list on the My Credentials page, or its authentication will fail and you cannot view OS monitoring data on Cloud Eye.
RegionId
Region ID. For example, if the ECS or BMS is located in the CN-Hong Kong region, RegionId is ap-southeast-1. For IDs of other regions, see Regions and Endpoints.
ClientPort
Start port number used by the Agent.
NOTE:The default value is 0, indicating that the Agent will randomly use an available port. Ports 1 to 1023 are reserved. You are advised not to specify a port in this range for the Agent.
PortNum
Number of ports configured for the Agent.
NOTE:The default value is 200. If ClientPort is set to 5000, the Agent will use ports in the range port 5000 to 5199.
- Open the conf.json file in C:\Program Files\uniagent\conf and modify it by referring to Table 4.
- After the configuration is complete, log in to the Server Monitoring page. If the Agent status is Running, the Agent has been installed and started to collect fine-grained metrics.
After you configure the Agent, its status is still displayed as Not installed because no monitoring data is reported yet. Wait for 3 to 5 minutes and refresh the page.
- Log in to the ECS as an administrator.
- Open the conf.json file in the C:\Program Files\telescope folder.
- Configure the following parameters. For details, see Table 5. Figure 4 Modifying the conf.json configuration file for the ECS
{ "InstanceId":"", "ProjectId": "", "AccessKey": "XXXXXXXXXXXXXXXXXXXX", "SecretKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "RegionId": "ap-southeast-1", "ClientPort": 0, "PortNum": 200 }Table 5 Public parameters Parameter
Description
InstanceId
Instance ID. This parameter is left blank by default, indicating that the instance ID of the current server is specified. Retain the default value. To change the value, log in to the Cloud Eye console and choose Server Monitoring in the navigation pane.
NOTE:When configuring the instance ID, comply with the following rules:
- The instance ID must be unique, that is, in the same region, InstanceId used by the Agent cannot be the same, or errors may occur.
- The InstanceId value must be consistent with the actual ECS or BMS ID. Otherwise, you cannot see the OS monitoring data on Cloud Eye.
ProjectId
Project ID. This parameter is left blank by default, indicating that the project ID of the current server is specified. Retain the default value. If you need to configure it, obtain the project ID as follows:
- Log in to the Cloud Eye console.
- Move the cursor to the username in the upper right corner and choose My Credentials from the Basic Information dialog box.
- Under Projects, obtain the project ID for the region where the ECS or BMS is located.
AccessKey/SecretKey
Access key (AK) and secret key (SK). To obtain them:
- Log in to the Cloud Eye console.
- Move the cursor to the username in the upper right corner and choose My Credentials from the Basic Information dialog box.
- In the navigation pane, choose Access Keys.
- If you have obtained the access key, obtain the AccessKey value and the SecretKey value in the credentials.csv file saved after you create the access key.
- If no access keys are available, click Create Access Key to create one. Save the credentials.csv file and obtain the AccessKey value and the SecretKey value in it. NOTICE:
- For security purposes, use an IAM username with the CES Administrator and LTS Administrator permissions. For details, see Creating a User Group and Assigning Permissions and Creating an IAM User and Logging In.
- The configured access key must be in the Access Keys list on the My Credentials page, or its authentication will fail and you cannot view OS monitoring data on Cloud Eye.
RegionId
Region ID. For example, if the ECS or BMS is located in the CN-Hong Kong region, RegionId is ap-southeast-1. For IDs of other regions, see Regions and Endpoints.
ClientPort
Start port number used by the Agent.
NOTE:The default value is 0, indicating that the Agent will randomly use an available port. Ports 1 to 1023 are reserved. You are advised not to specify a port in this range for the Agent.
PortNum
Number of ports configured for the Agent.
NOTE:The default value is 200. If ClientPort is set to 5000, the Agent will use ports in the range port 5000 to 5199.
- Open the conf_ces.json file in C:\Program Files\telescope and modify the configuration file of the metric collection module of Cloud Eye.
- Modify the parameter in conf_ces.json and save it. For details, see Table 6.
{ "Endpoint": "https://ces.ap-southeast-1.myhuaweicloud.com" }Table 6 Parameter of the metric collection module Parameter
Description
Endpoint
Cloud Eye endpoint URL in the region where the ECS or BMS is located. For example, if the ECS or BMS is in the CN-Hong Kong region, Endpoint is ces.ap-southeast-1.myhuaweicloud.com. For the endpoint values of other regions, see Regions and Endpoints.
- After the configuration is complete, log in to the Server Monitoring page. If the Agent status is Running, the Agent has been installed and started to collect fine-grained metrics.
After you configure the Agent, its status is still displayed as Not installed because no monitoring data is reported yet. Wait for 3 to 5 minutes and refresh the page.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot