Skip to content

Alibaba Cloud AnalyticDB PostgreSQL

Alibaba Cloud AnalyticDB PostgreSQL metrics display, including CPU, memory, disk, coordinator nodes, instance queries, etc.

Configuration

Install Func

It is recommended to enable TrueWatch Integration - Extensions - DataFlux Func (Automata)

If deploying Func manually, refer to Deploy Func Manually

Enable Script

Note: Please prepare the Alibaba Cloud AK with the required permissions in advance (for simplicity, you can grant the global read-only permission ReadOnlyAccess)

Enable Script for DataFlux Func (Automata)

  1. Log in to the TrueWatch console
  2. Click the 【Integration】 menu and select 【Cloud Account Management】
  3. Click 【Add Cloud Account】, select 【Alibaba Cloud】, and fill in the required information on the interface. If the cloud account information has been configured before, ignore this step
  4. Click 【Test】, and after the test is successful, click 【Save】. If the test fails, please check if the relevant configuration information is correct and test again
  5. In the 【Cloud Account Management】 list, you can see the added cloud account. Click the corresponding cloud account to enter the details page
  6. Click the 【Integration】 button on the cloud account details page. In the Not Installed list, find Alibaba Cloud AnalyticDB PostgreSQL, and click the 【Install】 button. The installation interface will pop up for installation.

Enable Script Manually

  1. Log in to the Func console, click 【Script Market】, enter the TrueWatch script market, and search for: integration_alibabacloud_analyticdb_postgresql

  2. After clicking 【Install】, enter the corresponding parameters: Alibaba Cloud AK ID, AK Secret, and account name.

  3. Click 【Deploy Startup Script】, the system will automatically create the Startup script set and configure the corresponding startup script.

  4. After enabling, you can see the corresponding automatic trigger configuration in 「Manage / Automatic Trigger Configuration」. Click 【Execute】 to execute it immediately without waiting for the scheduled time. After a while, you can check the execution task records and corresponding logs.

Verification

  1. In 「Manage / Automatic Trigger Configuration」, confirm whether the corresponding task has the corresponding automatic trigger configuration, and check the corresponding task records and logs for any exceptions
  2. In TrueWatch, check if asset information exists in 「Infrastructure / Custom」
  3. In TrueWatch, check if there are corresponding monitoring data in 「Metrics」

Metrics

After configuring Alibaba Cloud AnalyticDB PostgreSQL, the default Measurement is as follows. More metrics can be collected through configuration Alibaba Cloud Cloud Monitor Metrics Details

MetricName MetricCategory MetricDescribe Dimensions Statistics Unit MinPeriods
node_cpu_used_percent gpdb 【Storage Elastic & Serverless】Node CPU Usage userId,instanceId,instance_component,hostname Average,Maximum,Minimum % 60 s
node_mem_used_percent gpdb 【Storage Elastic & Serverless】Node Memory Usage userId,instanceId,instance_component,hostname Average,Maximum,Minimum % 60 s
node_disk_used_percent gpdb 【Storage Elastic & Serverless】Node Disk Usage userId,instanceId,instance_component,hostname Average,Maximum,Minimum % 60 s
adbpg_conn_count gpdb 【Storage Elastic & Serverless】Coordinator Node Total Connections userId,instanceId,instance_component,hostname Average,Maximum,Minimum count 60 s
adbpg_master_cnt_unhealth gpdb 【Storage Elastic & Serverless】Coordinator Node Unhealthy Count userId,instanceId Average,Maximum,Minimum count 60 s
adbpg_query_blocked gpdb 【Storage Elastic & Serverless】Instance Blocked Query Count userId,instanceId Average,Maximum,Minimum count 60 s
adbpg_query_queued gpdb 【Storage Elastic & Serverless】Instance Queued Query Count userId,instanceId Average,Maximum,Minimum count 60 s

Objects

The collected Alibaba Cloud AnalyticDB PostgreSQL object data structure can be seen in 「Infrastructure - Custom」

{
  "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}}",
  }
}