Skip to content

Collector "Alibaba Cloud - RDS Error Log" Configuration Manual

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

The code execution of this script depends on the RDS instance object collection. If the custom object collection for RDS is not configured, the error log script cannot collect error log data.

1. Configuration Structure

The configuration structure of this collector is as follows:

Field Type Required Description
regions list Required List of regions to be collected
regions[#] str Required Region ID. For example: 'cn-hangzhou'
See appendix for the full list

2. Configuration Example

Specifying Regions

Collect data from Hangzhou and Shanghai regions.

collector_configs = {
    'regions': [ 'cn-hangzhou', 'cn-shanghai' ],
}

3. Data Reporting Format

After data is successfully synchronized, you can view the data in the "LOG" section of TrueWatch.

Example of reported data:

{
  "measurement": "aliyun_rds_errorlog",
  "tags": {
    "name"                 : "rm-xxxxx",
    "DBInstanceId"         : "rm-bp1xxxxxxxxxx",
    "RegionId"             : "cn-hangzhou",
    "DBInstanceType"       : "Primary",
    "PayType"              : "Prepaid",
    "Engine"               : "MySQL",
    "DBInstanceClass"      : "rds.mysql.s2.large",
    "ZoneId"               : "cn-shanghai-h",
    "DBInstanceDescription": "xxxx",
  },
  "fields": {
    "CreateTime": "2023-06-15T09:05:17Z",
    "ErrorInfo" : "{Error Information}",
  }
}
Note

Fields in tags and fields may change with subsequent updates.

Tip

fields.message is a JSON serialized string.

X. Appendix

Please refer to the official Alibaba Cloud documentation: