Skip to content

Alibaba Cloud PolarDB Distributed 2.0

Alibaba Cloud PolarDB Distributed 2.0 displays metrics for the computing layer and storage nodes, including CPU utilization, connection usage, disk usage, disk usage rate, memory utilization, network bandwidth, etc.

Configuration

Install Func

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

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

Enable Script

Note: Please prepare an Alibaba Cloud AK that meets the requirements 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, select 【Cloud Account Management】
  3. Click 【Add Cloud Account】, select 【Alibaba Cloud】, fill in the required information on the interface; if cloud account information has been configured before, ignore 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. Click on the 【Cloud Account Management】 list to 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 Distributed 2.0, click the 【Install】 button, and install it via the installation interface.

Manual Enable Script

  1. Log in to the Func console, click 【Script Market】, enter the official script market, search:guance_aliyun_polardbx_2

  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 script.

  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 regular time. Wait a moment, you can view the execution task records and corresponding logs.

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

Metrics

After configuring Alibaba Cloud PolarDB Distributed 2.0, the default metric sets are as follows, you can collect more metrics through configuration

Alibaba Cloud Cloud Monitoring - Native Cloud Distributed Database PolarDB-X 2.0 Compute Node Metric Details Alibaba Cloud Cloud Monitoring - Native Cloud Distributed Database PolarDB-X 2.0 Storage Node Metric Details

Compute Node Metrics

Metric Description Statistics Unit
ActiveConnectionsOfCN PolarDB-X compute layer active connections Sum count
CPUUsageOfCN PolarDB-X compute layer CPU usage Average %
ConnectionsOfCN PolarDB-X compute layer connections Sum count
ErrorCountOfCN PolarDB-X compute layer errors Sum count/s
FullGcTimeOfCN PolarDB-X Full GC time Sum nanoseconds
LogicRTOfCN PolarDB-X compute layer logical response time Average μs
LogicRequestCountOfCN PolarDB-X compute layer logical request count Sum req/s
LogicSlowOfCN PolarDB-X compute layer logical slow SQL Sum req/s
MemUsageOfCN PolarDB-X compute layer memory usage Average %
NetInOfCN PolarDB-X compute layer network traffic (in) Sum B/s
NetOutOfCN PolarDB-X compute layer network traffic (out) Sum B/s

Storage Node Metrics

Metric Description Statistics Unit
ActiveSessionsOfDN PolarDB-X storage node ActiveSessions Average count
CPUUsageOfDN PolarDB-X storage node CPU usage Average %
ConnUsageOfDN PolarDB-X storage node connection usage Average %
DiskSizeOfDN PolarDB-X storage node disk usage Average Megabytes
DiskUsageOfDN PolarDB-X storage node disk usage rate Average %
IOPSUsageOfDN PolarDB-X storage node IOPS usage rate Average %
IbufDirtyRatioOfDN PolarDB-X storage node BP dirty page percentage Average %
IbufReadHitOfDN PolarDB-X storage node BP read hit rate Average %
IbufUseRatioOfDN PolarDB-X storage node BP usage rate Average %
LogDiskSizeOfDN PolarDB-X storage node log disk usage Average Megabytes
MemUsageOfDN PolarDB-X storage node memory usage Average %
NetworkInDN PolarDB-X storage node network inbound bandwidth Average bits/s
NetworkOutDN PolarDB-X storage node network outbound bandwidth Average bits/s
SlaveLagOfDN PolarDB-X storage node standby delay Average seconds
SlowQueriesOfDN PolarDB-X storage node slow queries per second Average countSecond
TempDiskTableCreatesOfDN PolarDB-X storage node temporary tables created per second Average countSecond
ThreadsConnectedOfDN PolarDB-X storage node threads connected Average count
ThreadsRunningOfDN PolarDB-X storage node active threads Average count
TmpDiskSizeOfDN PolarDB-X storage node temporary disk usage Average Megabytes

Objects

The collected Alibaba Cloud PolarDB Distributed 2.0 object data structure can be viewed under 「Infrastructure - Custom」

{
  "measurement": "aliyun_polardbx_2",
  "tags": {
    "ClassCode"             : "",
    "CommodityCode"         : "drds_polarxpost_public_cn",
    "DBInstanceName"        : "pxc-s-hzr1ch4n3icc3w",
    "DBType"                : "polarx",
    "DnNodeClassCode"       : "mysql.n2.medium.25",
    "Engine"                : "polarx",
    "Id"                    : "pxc-xdb-s-shzr1ch4n3icc3wbf04",
    "LockMode"              : "Unlock",
    "MinorVersion"          : "polarx-kernel_standard_xcluster-20230508",
    "Network"               : "VPC",
    "NodeClass"             : "mysql.n2.medium.25",
    "PayType"               : "Postpaid",
    "Series"                : "standard",
    "Status"                : "Running",
    "Type"                  : "ReadWrite",
    "VPCId"                 : "vpc-bp1uhj8mimgturv8c0gg6",
    "ZoneId"                : "cn-hangzhou-k;cn-hangzhou-k;cn-hangzhou-k",
    "name"                  : "pxc-xdb-s-shzr1ch4n3icc3wbf04"
  },
  "fields": {
    "CnNodeCount"           : 0,
    "CreateTime"            : "2023-08-16T06:57:41.000+0000",
    "Description"           : "",
    "DnNodeCount"           : 1,
    "ExpireTime"            : "2123-08-16T16:00:00.000+0000",
    "Expired"               : false,
    "NodeCount"             : 1,
    "ReadDBInstances"       : "[]",
    "ResourceGroupId"       : "rg-acfmv3ro3xnfwaa",
    "StorageUsed"           : 2343567360,
    "message"               : "{instance json data}}",
  }
}

Note: The fields in tags and fields may change with subsequent updates

Tip 1: tags.name value is the instance ID, used as unique identification

Tip 2: fields.message are all JSON serialized strings

Feedback

Is this page helpful? ×