Huawei Cloud FunctionGraph¶
The Metrics displayed by Huawei Cloud FunctionGraph include the number of invocations, errors, rejections, concurrency, number of reserved instances, and running time (including maximum, minimum, and average running time). These Metrics reflect the running status of FunctionGraph functions.
Configuration¶
Install Func¶
It is recommended to activate 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-deploy Func
Install Script¶
Note: Please prepare the required Huawei Cloud AK in advance (for simplicity, you can directly grant global read-only permissions
ReadOnlyAccess
)
-
Log in to the Func console, click [Script Market], enter the TrueWatch script market, and search for
ID: integration_huaweicloud_functiongraph
-
Click [Install], then enter the corresponding parameters: Huawei Cloud AK, SK, and account name
-
Click [Deploy Startup Script], the system will automatically create a
Startup
script set and configure the corresponding startup scripts -
After enabling, you can see the corresponding automatic trigger configuration in "Management / Automatic Trigger Configuration". Click [Execute] to immediately execute once without waiting for the scheduled time. Wait a moment, and you can view the execution task records and corresponding logs
Verification¶
- In "Management / Automatic Trigger Configuration", confirm whether the corresponding task has the automatic trigger configuration, and check the corresponding task records and logs for any exceptions
- In TrueWatch, check if there is asset information in "Infrastructure / Custom"
- In TrueWatch, check if there is corresponding monitoring data in "Metrics"
Metrics¶
After configuring HUAWEI SYS.FunctionGraph, the default Measurement is as follows. You can collect more Metrics by configuration Huawei Cloud Cloud Monitoring Metrics Details
Metric ID | Metric Name | Metric Description | Value Range | Measurement Object | Monitoring Period (Original Metric) |
---|---|---|---|---|---|
count |
Number of Invocations | This Metric is used to count the number of function invocations. Unit: count | ≥ 0 counts | Function | 1 minute |
failcount |
Number of Errors | This Metric is used to count the number of function invocation errors. The following two situations will be counted as errors: function request exception, resulting in failure to complete execution and return 200. Function syntax error or execution error. Unit: count | ≥ 0 counts | Function | 1 minute |
rejectcount |
Number of Rejections | This Metric is used to count the number of function invocation rejections. Rejections refer to the number of requests rejected due to system throttling caused by too many concurrent requests. Unit: count | ≥ 0 counts | Function | 1 minute |
concurrency |
Concurrency | This Metric is used to count the maximum number of concurrent requests handled by the function. Unit: count | ≥ 0 counts | Function | 1 minute |
reservedinstancenum |
Number of Reserved Instances | This Metric is used to count the number of reserved instances configured for the function. Unit: count | ≥ 0 counts | Function | 1 minute |
duration |
Average Running Time | This Metric is used to count the average running time of function invocations. Unit: milliseconds | ≥ 0 ms | Function | 1 minute |
maxDuration |
Maximum Running Time | This Metric is used to count the maximum running time of function invocations. Unit: milliseconds | ≥ 0 ms | Function | 1 minute |
minDuration |
Minimum Running Time | This Metric is used to count the minimum running time of function invocations. Unit: milliseconds | ≥ 0 ms | Function | 1 minute |
Object¶
The collected HUAWEI SYS.FunctionGraph object data structure can be seen in "Infrastructure - Custom"
{
"measurement": "huaweicloud_functiongraph",
"tags": {
"code_type" : "inline",
"domain_id" : "1e1fed98168XXXXXX0e285140c83",
"func_name" : "XXXXX",
"func_urn" : "urn:fss:cn-north-4:c631f046252d4ebda45f253c62d48585:function:default:Helloworld2",
"handler" : "index.handler",
"image_name" : "latest-230718XXXXX@fikfe",
"namespace" : "c631f04625XXXXXX45f253c62d48585",
"package" : "default",
"project_name" : "cn-north-4",
"runtime" : "Python3.9"
},
"fields": {
"code_size" : 286,
"cpu" : 300,
"last_modified" : "2023-07-18TXX:XX:XX+08:00",
"memory_size" : 128,
"timeout" : 3,
"strategy_config" : "{Function Strategy Configuration}",
"message" : "{Instance JSON Data}"
}
}
Note: The fields in
tags
,fields
may change with subsequent updatesNote 1: The value of
tags.name
is the instance ID, used as the unique identifierNote 2:
fields.last_modified
,fields.message
,fields.strategy_config
are all JSON serialized strings