Skip to content

Collector Configuration Manual for "Alibaba Cloud - RDS Error Logs"

Before reading this, please first refer to:

Before using this collector, you must install the 'Integration Core Package' and its corresponding third-party dependency packages

This script's code execution depends on RDS instance object collection. If custom object collection for RDS is not configured, the error log script will not be able to 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 collect data from
regions[#] str Required Region ID. For example: 'cn-hangzhou'
See the full table in the appendix

2. Configuration Example

Specifying Regions

Collect data from Hangzhou and Shanghai regions.

Python
1
2
3
collector_configs = {
    'regions': [ 'cn-hangzhou', 'cn-shanghai' ],
}

3. Data Reporting Format

After the data synchronizes successfully, it can be viewed in the 'LOGs' section of TrueWatch.

Example of reported data:

JSON
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
{
  "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}",
  }
}

Fields in tags and fields may change with subsequent updates.

fields.message is a JSON serialized string.

X. Appendix

Please refer to the official Alibaba Cloud documentation: