Skip to content

Collector "Alibaba Cloud - AnalyticDB for PostgreSQL" 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.

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 appendix for the complete 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 TrueWatch's "Infrastructure - Resource Catalog".

Example of reported data:

{
  "measurement": "aliyun_analyticdb_postgresql",
  "tags": {
    "DBInstanceCategory"        : "Basic",
    "DBInstanceId"              : "gp-bp17993xt44lmgyga",
    "DBInstanceMode"            : "StorageElastic",
    "DBInstanceNetType"         : "2",
    "DBInstanceStatus"          : "CREATING",
    "Engine"                    : "gpdb",
    "EngineVersion"             : "6.0",
    "InstanceDeployType"        : "cluster",
    "InstanceNetworkType"       : "VPC",
    "LockMode"                  : "Unlock",
    "LockReason"                : "0",
    "PayType"                   : "Postpaid",
    "RegionId"                  : "cn-hangzhou",
    "ResourceGroupId"           : "rg-acfmv3ro3xnfwaa",
    "StorageType"               : "cloud_essd",
    "VSwitchId"                 : "vsw-bp1k8o6a4cb1pnq6ximgb",
    "VpcId"                     : "vpc-bp1pftfpllxna4t75e73v",
    "ZoneId"                    : "cn-hangzhou-j",
    "name"                      : "gp-bp17993xt44lmgyga"
  },
  "fields": {
    "CreateTime"            : "2023-08-16T03:07:45Z",
    "DBInstanceDescription" : "gp-bp17993xt44lmgyga",
    "ExpireTime"            : "2999-09-08T16:00:00Z",
    "MasterNodeNum"         : 1,
    "SegNodeNum"            : "2",
    "StorageSize"           : "50",
    "message"               : "{Instance JSON data}}",
  }
}
Note

The fields in tags and fields may change with subsequent updates.

Tip

The value of tags.name is the instance ID, which serves as a unique identifier, and fields.message is a JSON serialized string.

X. Appendix

Please refer to the official Alibaba Cloud documentation: