Collector Configuration Manual for Alibaba Cloud Site Monitoring Metrics¶
Before reading this document, please read:
Tip
Before using this collector, you must install the "Integration Core Package" and its accompanying third-party dependencies.
Tip
Before collecting site monitoring metrics data, you must configure the "Alibaba Cloud Site Monitoring Task Collection" custom object collector.
Tip
This collector supports multi-threading by default (five threads are enabled by default). If you need to change the thread pool size, you can set the environment variable COLLECTOR_THREAD_POOL_SIZE
.
1. Configuration Structure¶
No additional configuration is required for site monitoring metrics collection.
2. Metrics Data Format¶
After data synchronization is complete, you can view the data in the "Metrics" section of TrueWatch.
Example data:
{
"fields": {
"HTTPConnectTime": 33.0,
"HTTPDNSTime": 9.0,
"HTTPDownloadSize": 56172.0,
"HTTPDownloadSpeed": 8582605.0,
"HTTPDownloadTime": 6.0,
"HTTPResponseCode": 200.0,
"SSLConnectTime": 42.0,
"TotalTime": 227.0,
"curlConnectTime": 15.0,
"curlPretransferTime": 42.0,
"curlStarttransferTime": 143.0,
"errorCode": 0.0,
"redirectCount": 1.0,
"redirectTime": 77.0,
"tcpConnectTime": 15.0
},
"measurement": "aliyun_site_monitor",
"tags": {
"TaskId": "693a16b9-xxxx",
"areaCN": "East China",
"areaEN": "HuaDong",
"cityCN": "Shanghai",
"cityEN": "Shanghai",
"countryCN": "China",
"countryEN": "China",
"ispCN": "Alibaba",
"ispEN": "Alibaba",
"provinceCN": "Shanghai",
"provinceEN": "Shanghai"
},
"timestamp": 1715050378317
}
Tip
All metric values will be reported as float type.
3. Integration with Custom Object Collector¶
When the "Alibaba Cloud Site Monitoring Task Collection" custom object collector is running in the same DataFlux Func, this collector will automatically try to match the tags.TaskId
field with the tags.name
field in the custom object.
Since it is necessary to know the custom object information in advance for integration with cloud monitoring collectors, it is generally recommended to place the cloud monitoring collector at the end of the list, such as:
# Create collector
import integration_alibabacloud_site_monitor_task__main as main
import integration_alibabacloud_site_monitor_metric__main as monitor_main
@DFF.API('AlibabaCloud-Site-Monitor Collection', timeout=3600, fixed_crontab='* * * * *')
def run():
collectors = [
main.DataCollector(account),
monitor_main.DataCollector(account) # Cloud monitoring collectors are usually placed at the end
]
When a successful match is made, the fields from the matched custom object tags
will be added to the monitoring data tags
, enabling effects such as filtering cloud monitoring metrics data using instance names.
The final reported data is as follows:
{
"fields": {
"HTTPConnectTime": 33.0,
"HTTPDNSTime": 9.0,
"HTTPDownloadSize": 56172.0,
"HTTPDownloadSpeed": 8582605.0,
"HTTPDownloadTime": 6.0,
"HTTPResponseCode": 200.0,
"SSLConnectTime": 42.0,
"TotalTime": 227.0,
"curlConnectTime": 15.0,
"curlPretransferTime": 42.0,
"curlStarttransferTime": 143.0,
"errorCode": 0.0,
"redirectCount": 1.0,
"redirectTime": 77.0,
"tcpConnectTime": 15.0
},
"measurement": "aliyun_site_monitor",
"tags": {
"Address": "www.xxxx.com",
"AgentGroup": "PC",
"Interval": "60000",
"TaskId": "693a16b9-xxxx",
"TaskName": "xxx",
"TaskState": "1",
"TaskType": "HTTP",
"areaCN": "East China",
"areaEN": "HuaDong",
"cityCN": "Shanghai",
"cityEN": "Shanghai",
"countryCN": "China",
"countryEN": "China",
"ispCN": "Alibaba",
"ispEN": "Alibaba",
"name": "693a16b9-xxxx",
"provinceCN": "Shanghai",
"provinceEN": "Shanghai"
},
"timestamp": 1715052030667
}
5. Cloud Monitoring API Call Count Explanation¶
Tip
Currently, there is no documentation on charging for this API.
X. Appendix¶
Please refer to the official Alibaba Cloud documentation: