Skip to content

Huawei Cloud APIG

Collect Huawei Cloud APIG monitoring metrics

Configuration

Install Func

It is recommended to activate the TrueWatch Integration - Extensions - DataFlux Func (Automata): All prerequisites are automatically installed. Please proceed with the script installation.

For self-deployment of Func, refer to Self-deploying Func

Install Script

Note: Please prepare the Huawei Cloud AK in advance (for simplicity, you can directly grant the global read-only permission ReadOnlyAccess)

  1. Log in to the Func console, click on 【Script Market】, enter the TrueWatch Script Market, and search for integration_huaweicloud_apig

  2. Click on 【Install】, then input the corresponding parameters: Huawei Cloud AK, SK, and account name

  3. Click on 【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 on 【Execute】 to immediately execute once without waiting for the scheduled time. After a short while, you can check the execution task records and corresponding logs

Verification

  1. In 「Manage / Automatic Trigger Configuration」, confirm whether the corresponding task has the automatic trigger configuration, and check the corresponding task records and logs for any exceptions
  2. In TrueWatch, check in 「Infrastructure - Resource Catalog」 if asset information exists
  3. In TrueWatch, check in 「Metrics」 if there are corresponding monitoring data

Metrics

Collect Huawei Cloud APIG metrics, and more metrics can be collected through configuration Huawei Cloud APIG Metrics Details

Huawei Cloud APIG metrics are under the huaweicloud_SYS.APIC Measurement, below are the APIG related metrics descriptions

Metric ID Metric Name Metric Meaning Value Range Unit Measurement Object (Dimension) Monitoring Cycle (Original Metric)
throttled_calls API Throttled Calls Count This metric indicates the cumulative count of API calls after throttling ≥0 Times/min Exclusive API Gateway Instance (instance_id) 1 minute
requests API Call Count This metric indicates the API call count ≥0 Times/min Exclusive API Gateway Instance (instance_id) 1 minute
req_count_error Error Count This metric indicates the total error count of the API ≥0 Times/min Single API (instance_id,api_id) 1 minute
req_count_5xx 5xx Call Count This metric indicates the 5xx call count of the API ≥0 Times/min Single API (instance_id,api_id) 1 minute
req_count_4xx 4xx Call Count This metric indicates the 4xx call count of the API ≥0 Times/min Single API (instance_id,api_id) 1 minute
req_count_2xx 2xx Call Count This metric indicates the 2xx call count of the API ≥0 Times/min Single API (instance_id,api_id) 1 minute
req_count API Call Count This metric indicates the API call count ≥0 Times/min Single API (instance_id,api_id) 1 minute
output_throughput Outbound Traffic This metric indicates the outbound traffic of the API ≥0 Byte Single API (instance_id,api_id) 1 minute
max_latency Maximum Latency in Milliseconds This metric indicates the maximum latency in milliseconds of the API ≥0 ms Exclusive API Gateway Instance (instance_id) 1 minute
max_latency Maximum Latency in Milliseconds This metric indicates the maximum latency in milliseconds of the API ≥0 ms Single API (instance_id,api_id) 1 minute
input_throughput Inbound Traffic This metric indicates the inbound traffic of the API ≥0 Byte Single API (instance_id,api_id) 1 minute
error_5xx 5xx Call Count This metric indicates the 5xx call count of the API ≥0 Times/min Exclusive API Gateway Instance (instance_id) 1 minute
error_4xx 4xx Call Count This metric indicates the 4xx call count of the API ≥0 Times/min Exclusive API Gateway Instance (instance_id) 1 minute
avg_latency Average Latency in Milliseconds This metric indicates the average latency in milliseconds of the API ≥0 ms Exclusive API Gateway Instance (instance_id) 1 minute
avg_latency Average Latency in Milliseconds This metric indicates the average latency in milliseconds of the API ≥0 ms Single API (instance_id,api_id) 1 minute
node_system_load Gateway Node System Load This metric is used to count the current data plane gateway node load details, 1 indicates low water level, 2 indicates medium water level, 3 indicates high water level 1,2,3 count Single API (instance_id,api_id) 1 minute
node_cpu_usage Gateway Node CPU Usage This metric is used to count the current data plane gateway node CPU usage ≥0 % Single API (instance_id,api_id) 1 minute
node_memory_usage Gateway Node Memory Usage This metric is used to count the current data plane gateway node memory usage ≥0 % Single API (instance_id,api_id) 1 minute

Objects

After data is synchronized normally, you can view the data in TrueWatch's 「Infrastructure - Resource Catalog」.

{
  "measurement": "huaweicloud_apig",
  "tags": {
    "RegionId"               : "cn-south-4",
    "project_id"             : "756ada1aa17e4049b2a16ea41912e52d",
    "enterprise_project_id"  : "0824ss-xxxx-xxxx-xxxx-12334fedffg",
    "instance_id"            : "xxxxxx",
    "instance_name"          : "test",
    "status"                 : "AVAILABLE",
    "eip_address"            : "xxxxxx"
  },
  "fields": {
    "type"                       : "xxxxxx",
    "spec"                       : "xxxxxx",
    "charge_mode"                : "1",
    "loadbalancer_provider"      : "xxxxx",
    "create_time"                : "2024-11-11T08:15:58Z",

  }
}

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