Huawei Cloud APIG
Collect Huawei Cloud APIG monitoring metrics
Configuration¶
Install Func¶
It is recommended to activate Guance Integration - Extensions - DataFlux Func (Automata): all prerequisites are automatically installed. Please proceed with the script installation.
If you are deploying Func yourself, refer to Self-deployed Func
Install Script¶
Note: Please prepare the Huawei Cloud AK that meets the requirements in advance (for simplicity, you can directly grant the global read-only permission
Tenant Guest)
Managed Version Activation Script¶
- Log in to the Guance console
- Click the [Integration] menu, select [Cloud Account Management]
- 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
- Click [Test], and if the test is successful, click [Save]. If the test fails, please check whether the relevant configuration information is correct and test again
- Click [Cloud Account Management] in the list to see the added cloud account, click the corresponding cloud account to enter the details page
- Click the [Integration] button on the cloud account details page, find
Huawei Cloud APIGunder theNot Installedlist, and click the [Install] button to pop up the installation interface for installation.
Manual Activation Script¶
-
Log in to the Func console, click [Script Market], enter the Guance script market, and search for
integration_huaweicloud_apig -
Click [Install], then enter the corresponding parameters: Huawei Cloud AK, SK, and account name
-
Click [Deploy Startup Script], the system will automatically create the
Startupscript set and automatically configure the corresponding startup script -
After enabling, you can see the corresponding automatic trigger configuration in "Management / Automatic Trigger Configuration". Click [Execute] to execute it immediately without waiting for the scheduled time. Wait a moment, you can view the execution task records and corresponding logs
Verification¶
- Confirm in "Management / Automatic Trigger Configuration" whether the corresponding task has the corresponding automatic trigger configuration, and you can also check the corresponding task records and logs to check for any exceptions
- In Guance, check whether asset information exists in "Infrastructure - Resource Catalog"
- In Guance, check whether there is corresponding monitoring data in "Metrics"
Metrics¶
Collect Huawei Cloud APIG metrics, you can collect more metrics through configuration Huawei Cloud APIG Metrics Details
Huawei Cloud APIG metrics are under the huaweicloud_SYS.APIC set, below is the description of APIG related metrics
| Metric ID | Metric Name | Metric Meaning | Value Range | Unit | Measurement Object (Dimension) | Monitoring Period (Original Metric) |
|---|---|---|---|---|---|---|
throttled_calls |
API Throttled Calls | This metric indicates the cumulative number of calls after the API is throttled | ≥0 | Times/min | Dedicated API Gateway Instance (instance_id) | 1 minute |
requests |
API Calls | This metric indicates the number of API calls | ≥0 | Times/min | Dedicated API Gateway Instance (instance_id) | 1 minute |
req_count_error |
Error Count | This metric indicates the total number of errors for the API | ≥0 | Times/min | Single API (instance_id, api_id) | 1 minute |
req_count_5xx |
5xx Calls | This metric indicates the number of 5xx calls for the API | ≥0 | Times/min | Single API (instance_id, api_id) | 1 minute |
req_count_4xx |
4xx Calls | This metric indicates the number of 4xx calls for the API | ≥0 | Times/min | Single API (instance_id, api_id) | 1 minute |
req_count_2xx |
2xx Calls | This metric indicates the number of 2xx calls for the API | ≥0 | Times/min | Single API (instance_id, api_id) | 1 minute |
req_count |
API Calls | This metric indicates the number of API calls | ≥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 Milliseconds | This metric indicates the maximum latency in milliseconds for the API | ≥0 | ms | Dedicated API Gateway Instance (instance_id) | 1 minute |
max_latency |
Maximum Latency Milliseconds | This metric indicates the maximum latency in milliseconds for 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 Calls | This metric indicates the number of 5xx calls for the API | ≥0 | Times/min | Dedicated API Gateway Instance (instance_id) | 1 minute |
error_4xx |
4xx Calls | This metric indicates the number of 4xx calls for the API | ≥0 | Times/min | Dedicated API Gateway Instance (instance_id) | 1 minute |
avg_latency |
Average Latency Milliseconds | This metric indicates the average latency in milliseconds for the API | ≥0 | ms | Dedicated API Gateway Instance (instance_id) | 1 minute |
avg_latency |
Average Latency Milliseconds | This metric indicates the average latency in milliseconds for 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 the data is synchronized normally, you can view the data in Guance'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
tagsandfieldsmay change with subsequent updates