Updated on 2025-09-11 GMT+08:00

(Optional) Manually Configuring the Agent

After the Agent is installed, you can click Restore Agent Configurations to configure the AK/SK, region ID, or project ID with a few clicks. If the Agent fails to be configured by clicking Restore Agent Configurations or due to other reasons, manually configure it by following the instructions provided in this section.

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

  1. Log in to an ECS as user root.
  2. 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
  1. Log in to an ECS as user root.
  2. Modify the conf.json file in the bin directory.
    1. Run the following command to open conf.json:
      vi /usr/local/uniagent/extension/install/telescope/bin/conf.json
    2. Modify the parameters in the file. For details, see Table 1.

      To avoid major security risks from storing plaintext AKs and SKs, it is recommended to delegate all ECS or BMS Agents in the region. For details, see How Do I Configure an Agency?

      {
          "InstanceId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
          "ProjectId": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
          "AccessKey": "XXXXXXXXXXXXXXXXXXXX",
          "SecretKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
          "RegionId": "ap-southeast-1",
          "ClientPort": 0,
          "PortNum": 200
      }
      Table 1 Public parameters

      Parameter

      Description

      InstanceId

      (Optional) ECS ID. You can log in to the management console and find the ECS ID in the ECS list.

      NOTE:

      If you choose not to configure InstanceId, retain "InstanceId":"". If you do configure it, ensure that both of the following requirements are met:

      • The ECS ID must be unique at all sites, 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

      (Optional) Project ID. If you choose not to configure ProjectId, retain "ProjectId": "".

      If you do configure it, do as follows:

      1. Log in to the Cloud Eye console, click your username in the upper right corner, and choose My Credentials.
      2. 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, click the username in the upper right corner, and choose My Credentials, and choose Access Keys.

      • If you have obtained the access key, obtain the AccessKey value and the SecretKey value in the credentials.csv file saved when you create Access Keys.
      • 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..
        • The configured access key must be within 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 https://developer.huaweicloud.com/intl/en-us/endpoint.

      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 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.

  1. Log in to an ECS as user root.
  2. Go to the Agent installation path.
    cd /usr/local/telescope/bin
  3. Modify the conf.json configuration file.
    1. Run the following command to open conf.json:
      vi conf.json
    2. Modify the parameter settings in the file. For details, see Table 2.
      ECS parameters
      {
          "InstanceId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
          "ProjectId": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
          "AccessKey": "XXXXXXXXXXXXXXXXXXXX",
          "SecretKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
          "RegionId": "ap-southeast-1",
          "ClientPort": 0,
          "PortNum": 200
      }

      BMS parameters

      {
          "InstanceId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
          "ProjectId": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
          "AccessKey": "XXXXXXXXXXXXXXXXXXXX",
          "SecretKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
          "RegionId": "ap-southeast-1",
          "ClientPort": 0,
          "PortNum": 200,
          "BmsFlag": true
      }
      Table 2 Public parameters

      Parameter

      Description

      InstanceId

      (Optional) ECS ID. You can log in to the management console and find the ECS ID in the ECS list.

      NOTE:

      If you choose not to configure InstanceId, retain "InstanceId":"". If you do configure it, ensure that both of the following requirements are met:

      • The ECS ID must be unique at all sites, 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, or you cannot see the OS monitoring data on Cloud Eye.

      ProjectId

      (Optional) Project ID. If you choose not to configure ProjectId, retain "ProjectId": "".

      If you do configure it, do as follows:

      1. Log in to the Cloud Eye console, click your username in the upper right corner, and choose My Credentials.
      2. 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, click the username in the upper right corner, and choose My Credentials, and choose Access Keys.

      • If you have obtained the access key, obtain the AccessKey value and the SecretKey value in the credentials.csv file saved when you create Access Keys.
      • 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..
        • The configured access key must be within 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 https://developer.huaweicloud.com/intl/en-us/endpoint.

      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 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.

  4. Modify the conf_ces.json configuration file for the Cloud Eye metric collection module.
    1. Run the following command to open public configuration file conf_ces.json:
      vi conf_ces.json
    2. Modify the endpoint in conf_ces.json, and save the file. For details, see Table 3.
      {
        "Endpoint": "https://ces.ap-southeast-1.myhuaweicloud.com"
      }
      Table 3 Parameters 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.myhwclouds.com. For the endpoint values of other regions, see https://developer.huaweicloud.com/intl/en-us/endpoint.

  5. After the configuration is complete, log in to the management console. In the navigation pane, choose Server Monitoring. If the Agent is running, it has been installed and starts to collect fine-grained metrics.

    After you configure the Agent, its status is still displayed as Uninstalled because the monitoring data has not been reported yet. Wait for 3 to 5 minutes and refresh the page.

Windows OSs

Checking the version of the Agent in use

  1. Log in to an ECS as an administrator.
  2. Check the installation path and the Agent version.
  1. Log in to an ECS as an administrator.
  2. Open the conf.json file in the C:\Program Files\uniagent\extension\install\telescope\bin folder.
  3. Configure the following parameters. For details, see Table 4.

    Storing plaintext AKs and SKs poses great security risks. You are advised to delegate all Agents installed on ECSs or BMSs in the region. For details, see How Do I Configure an Agency?

    {
        "InstanceId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
        "ProjectId": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "AccessKey": "XXXXXXXXXXXXXXXXXXXX",
        "SecretKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "RegionId": "ap-southeast-1",
        "ClientPort": 0,
        "PortNum": 200
    }
    Table 4 Public parameters

    Parameter

    Description

    InstanceId

    (Optional) ECS ID. You can log in to the management console and find the ECS ID in the ECS list.

    NOTE:

    If you choose not to configure InstanceId, retain "InstanceId":"". If you do configure it, ensure that both of the following requirements are met:

    • The ECS ID must be unique at all sites, 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, or the OS monitoring data for the ECS or BMS will not be displayed on Cloud Eye.

    ProjectId

    (Optional) Project ID. If you choose not to configure ProjectId, retain "ProjectId": "".

    If you do configure it, do as follows:

    1. Log in to the Cloud Eye console, click your username in the upper right corner, and choose My Credentials.
    2. Under Projects, obtain the project ID for the region of the ECS or BMS.

    AccessKey/SecretKey

    Access key (AK) and secret key (SK). To obtain them:

    Log in to the Cloud Eye console, click the username in the upper right corner, and choose My Credentials, and choose Access Keys.

    • If you have obtained the access key, obtain the AccessKey value and the SecretKey value in the credentials.csv file saved when you create Access Keys.
    • 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..
      • The configured access key must be within 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 https://developer.huaweicloud.com/intl/en-us/endpoint.

    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 5000, the Agent will use ports in the range port 5000 to 5199.

  4. After the configuration is complete, log in to the management console. In the navigation pane, choose Server Monitoring. If the Agent is running, it has been installed and starts to collect fine-grained metrics.

    After you configure the Agent, its status is still displayed as Uninstalled because the monitoring data has not been reported yet. Wait for 3 to 5 minutes and refresh the page.

  1. Log in to an ECS using the administrator account.
  2. Open the conf.json file in the telescope_windows_amd64\bin directory.
  3. Configure the following parameters. For details, see Table 5.
    {
        "InstanceId":"",
        "ProjectId": "",
        "AccessKey": "",
        "SecretKey": "",
        "RegionId": "ap-southeast-1",
        "ClientPort": 0,
        "PortNum": 200
    }

    Table 5 Public parameters

    Parameter

    Description

    InstanceId

    (Optional) ECS ID. You can log in to the management console and find the ECS ID in the ECS list.

    NOTE:

    If you choose not to configure InstanceId, retain "InstanceId":"". If you do configure it, ensure that both of the following requirements are met:

    • The ECS ID must be unique at all sites, 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, or you cannot see the OS monitoring data on Cloud Eye.

    ProjectId

    (Optional) Project ID. If you choose not to configure ProjectId, retain "ProjectId": "".

    If you do configure it, do as follows:

    1. Log in to the Cloud Eye console, click your username in the upper right corner, and choose My Credentials.
    2. 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, click the username in the upper right corner, and choose My Credentials, and choose Access Keys.

    • If you have obtained the access key, obtain the AccessKey value and the SecretKey value in the credentials.csv file saved when you create Access Keys.
    • 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, it is recommended that you perform the above operations as an IAM user with the CES Administrator and LTS Administrator permissions only..
      • The configured access key must be within 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 https://developer.huaweicloud.com/intl/en-us/endpoint.

    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 5000, the Agent will use ports in the range port 5000 to 5199.

  4. After the configuration is complete, log in to the management console. In the navigation pane, choose Server Monitoring. If the Agent is running, it has been installed and starts to collect fine-grained metrics.

    After you configure the Agent, its status is still displayed as Uninstalled because the monitoring data has not been reported yet. Wait for 3 to 5 minutes and refresh the page.