Skip to content

Alibaba Cloud PolarDB PostgreSQL

Alibaba Cloud PolarDB PostgreSQL Metrics display, including CPU usage, memory usage, network traffic, connection count, IOPS, TPS, data disk size, etc.

Configuration

Install Func

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

If deploying Func by yourself, refer to Self-deploying Func

Activate Script

Note: Please prepare the Alibaba Cloud AK that meets the requirements in advance (for simplicity, you can directly grant the global read-only permission ReadOnlyAccess)

Activate Script in Automata

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

Manually Activate Script

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

  2. Click 【Install】, then 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 automatically configure the corresponding startup script.

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

Metrics

After configuring Alibaba Cloud Cloud Monitor, the default Measurement is as follows. You can collect more Metrics through configuration Alibaba Cloud Cloud Monitor Metrics Details

Metric Id Metric Name Dimensions Statistics Unit
pg_active_connections pg Active Connections userId,clusterId,instanceId Average count
pg_blks_read_delta pg Data Blocks Read userId,clusterId,instanceId Average count
pg_conn_usage pg Connection Usage userId,clusterId,instanceId Average %
pg_cpu_total pg CPU Usage userId,clusterId,instanceId Average %
pg_db_age pg Database Max Age userId,clusterId,instanceId Average xids
pg_mem_usage pg Memory Usage userId,clusterId,instanceId Average %
pg_pls_data_size pg Data Disk Size userId,clusterId,instanceId Value Mbyte
pg_pls_iops pg IOPS userId,clusterId,instanceId Average frequency
pg_pls_iops_read pg Read IOPS userId,clusterId,instanceId Average frequency
pg_pls_iops_write pg Write IOPS userId,clusterId,instanceId Average frequency
pg_pls_pg_wal_dir_size pg WAL Log Size userId,clusterId,instanceId Value Mbyte
pg_pls_throughput pg IO Throughput userId,clusterId,instanceId Average Mbyte/s
pg_pls_throughput_read pg Read IO Throughput userId,clusterId,instanceId Average Mbyte/s
pg_pls_throughput_write pg Write IO Throughput userId,clusterId,instanceId Average Mbyte/s
pg_rollback_ratio pg Transaction Rollback Rate userId,clusterId,instanceId Average %
pg_swell_time pg Swell Point userId,clusterId,instanceId Average s
pg_tps pg TPS userId,clusterId,instanceId Average frequency

Object

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

{
  "measurement": "aliyun_polardb",
  "tags": {
    "name"                : "pc-xxxx",
    "RegionId"            : "cn-hangzhou",
    "VpcId"               : "vpc-xxxx",
    "DBNodeNumber"        : "2",
    "PayType"             : "Postpaid",
    "DBType"              : "MySQL",
    "LockMode"            : "Unlock",
    "DBVersion"           : "8.0",
    "DBClusterId"         : "pc-xxxx",
    "DBClusterNetworkType": "VPC",
    "ZoneId"              : "cn-hangzhou-i",
    "Engine"              : "POLARDB",
    "Category"            : "Normal",
    "DBClusterDescription": "pc-xxxx",
    "DBNodeClass"         : "polar.mysql.x4.medium"
  },
  "fields": {
    "DBNodes"   : "{Node list JSON data}",
    "Database"  : "[Database details JSON data]",
    "ExpireTime": "",
    "CreateTime": "2022-06-17T06:07:19Z",
    "message"   : "{Instance JSON data}"
  }
}