Skip to content

Alibaba Cloud PolarDB PostgreSQL

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

Configuration

Install Func

It is recommended to enable Guance integration - extension - hosted Func.

If you deploy Func by yourself, refer to Self-deployed Func

Enable Script

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

Hosted Version Enable Script

  1. Log in to the Guance console.
  2. Click on the 【Integration】 menu and select 【Cloud Account Management】.
  3. Click 【Add Cloud Account】, choose 【Alibaba Cloud】, and fill in the required information on the interface. If you have already configured cloud account information before, skip this step.
  4. Click 【Test】, after a successful test click 【Save】. If the test fails, check whether the related configuration information is correct and retest.
  5. In the 【Cloud Account Management】 list, you can see the added cloud account. Click on the corresponding cloud account to enter the details page.
  6. Click the 【Integration】 button on the cloud account details page. Under the Not Installed list, find Alibaba Cloud PolarDB PostgreSQL, click the 【Install】 button, and install it from the pop-up installation interface.

Manual Enable Script

  1. Log in to the Func console, click 【Script Market】, go to the official script market, and search for guance_aliyun_polardb.

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

  3. Click 【Deploy Start Script】, the system will automatically create a Startup script set and automatically configure the corresponding start scripts.

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

We default collect some configurations, see the Metrics section for details.

Metrics

After configuring Alibaba Cloud - Cloud Monitoring, the default metric sets are as follows. You can collect more metrics through configuration Alibaba Cloud Cloud Monitoring Metric 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 Maximum 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

Objects

The collected Alibaba Cloud PolarDB object data structure can be viewed in the 「Infrastructure - Custom」 section.

{
  "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"   : "{JSON Data of Node List}",
    "Database"  : "[JSON Data of Database Details]",
    "ExpireTime": "",
    "CreateTime": "2022-06-17T06:07:19Z",
    "message"   : "{Instance JSON Data}"
  }
}

Feedback

Is this page helpful? ×