Skip to content

Huawei Cloud API

Use the "Cloud Synchronization" series of script packages in the script market to synchronize cloud monitoring and cloud asset data to Guance

Configuration

Install Func

It is recommended to enable Guance Integration - Extensions - DataFlux Func (Automata): all prerequisites are automatically installed. Please proceed with script installation.

If you are deploying Func manually, refer to Manual Func Deployment

Install Script

Note: Please prepare a Huawei Cloud AK with the required permissions in advance (for simplicity, you can directly grant the global read-only permission Tenant Guest).

Enable Script for DataFlux Func (Automata)

  1. Log in to the Guance console.
  2. Click the [Integration] menu and select [Cloud Account Management].
  3. Click [Add Cloud Account], select [Huawei Cloud], and fill in the required information on the interface. If you have already configured the cloud account information before, ignore this step.
  4. Click [Test]. After the test is successful, click [Save]. If the test fails, please check if the relevant configuration information is correct and retest.
  5. Click [Cloud Account Management] to see the added cloud accounts in the list. Click the corresponding cloud account to enter the details page.
  6. Click the [Integration] button on the cloud account details page. Under the Not Installed list, find Huawei Cloud API and click the [Install] button. The installation interface will pop up for installation.

Manually Enable Script

  1. Log in to the Func console, click [Script Market], enter the Guance script market, and search for integration_huaweicloud_apig.

  2. Click [Install], then enter the corresponding parameters: Huawei Cloud AK, SK, and account name.

  3. Click [Deploy Startup Script]. The system will automatically create the Startup script set and configure the corresponding startup scripts.

  4. After enabling, you can see the corresponding automatic trigger configuration in "Manage / Automatic Trigger Configuration". Click [Execute] to immediately execute once without waiting for the scheduled time. Wait a moment to view the execution task records and corresponding logs.

Verification

  1. In "Manage / Automatic Trigger Configuration", confirm whether the corresponding task has the corresponding automatic trigger configuration. You can also check the corresponding task records and logs to see if there are any exceptions.
  2. In Guance, check if the asset information exists in "Infrastructure / Custom".
  3. In Guance, check if there is corresponding monitoring data in "Metrics".

Metrics

After configuring Huawei Cloud Cloud Monitoring, the default Measurement is as follows. More Metrics can be collected through configuration. Huawei Cloud Cloud Monitoring Metrics Details

Metric ID Metric Name Metric Description Value Range Measurement Object Monitoring Cycle (Original Metric)
requests API Call Count Statistics measure the number of times the API interface is called. ≥0 Dedicated API Gateway Instance 1 minute
error_4xx 4xx Error Count Statistics measure the number of times the API interface returns 4xx errors. ≥0 Dedicated API Gateway Instance 1 minute
error_5xx 5xx Error Count Statistics measure the number of times the API interface returns 5xx errors ≥0 Dedicated API Gateway Instance 1 minute
throttled_calls Throttled Call Count Statistics measure the number of times the API is throttled ≥0 Dedicated API Gateway Instance 1 minute
avg_latency Average Latency in Milliseconds Statistics measure the average response delay time of the API interface ≥0 Unit: Milliseconds Dedicated API Gateway Instance 1 minute
max_latency Maximum Latency in Milliseconds Statistics measure the maximum response delay time of the API interface ≥0 Unit: Milliseconds Dedicated API Gateway Instance 1 minute
req_count API Call Count This metric is used to measure the number of times the API interface is called ≥0 Single API 1 minute
req_count_2xx 2xx Call Count This metric is used to measure the number of times the API interface returns 2xx ≥ 0 Single API 1 minute
req_count_4xx 4xx Error Count This metric is used to measure the number of times the API interface returns 4xx errors ≥ 0 Single API 1 minute
req_count_5xx 5xx Error Count This metric is used to measure the number of times the API interface returns 5xx errors ≥ 0 Single API 1 minute
req_count_error Error Count This metric is used to measure the total number of errors of the API interface ≥ 0 Single API 1 minute
avg_latency Average Latency in Milliseconds This metric is used to measure the average response delay time of the API interface ≥0 Unit: Milliseconds Single API 1 minute
max_latency Maximum Latency in Milliseconds This metric is used to measure the maximum response delay time of the API interface ≥0 Unit: Milliseconds Single API 1 minute
input_throughput Inbound Traffic This metric is used to measure the request traffic of the API interface ≥0. Unit: Byte/KB/MB/GB Single API 1 minute
output_throughput Outbound Traffic This metric is used to measure the response traffic of the API interface ≥0. Unit: Byte/KB/MB/GB Single API 1 minute

Object

The collected Huawei Cloud API object data structure can be seen in "Infrastructure - Custom".

{
  "measurement": "huaweicloud_apig",
  "tags": {
            "account_name":"Huawei",
            "class":"huaweicloud_apig",
            "cloud_provider":"huaweicloud",
            "instance_name":"apig-d0m1",
            "instance_status":"6",
            "loadbalancer_provider":"elb",
            "RegionId":"cn-north-4",
            "spec":"BASIC",
            "status":"Running",
            "type":"apig"
          },
}

Note: The fields in tags may change with subsequent updates.

Tip 1: The value of instance_name is the name, used as a unique identifier.

Feedback

Is this page helpful? ×