Skip to content

Alibaba Cloud PolarDB Distributed 2.0

Alibaba Cloud PolarDB Distributed 2.0 displays Metrics of the compute layer and storage nodes, including CPU utilization, connection usage, disk usage, disk utilization, memory utilization, network bandwidth, etc.

Configuration

Install Func

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

If deploying Func manually, refer to Manual Deployment of Func

Activate Script

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

Automata Activation Script

  1. Log in to the TrueWatch console
  2. Click on the 【Integration】 menu and select 【Cloud Account Management】
  3. Click on 【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 on 【Test】, and after a successful test, click on 【Save】. If the test fails, please check if the relevant configuration information is correct and test again
  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 on the 【Integration】 button on the cloud account details page, find Alibaba Cloud PolarDB Distributed 2.0 under the Uninstalled list, and click on the 【Install】 button. The installation interface will pop up for installation.

Manual Activation Script

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

  2. Click on 【Install】, then enter the corresponding parameters: Alibaba Cloud AK ID, AK Secret, and account name.

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

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

Metrics

After configuring Alibaba Cloud PolarDB Distributed 2.0, the default Measurement is as follows. More Metrics can be collected through configuration.

Alibaba Cloud Cloud Monitor - Cloud Native Distributed Database PolarDB-X 2.0 Compute Node Metric Details Alibaba Cloud Cloud Monitor - Cloud Native 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 utilization Average %
ConnectionsOfCN PolarDB-X compute layer connections Sum count
ErrorCountOfCN PolarDB-X compute layer error count Sum count/s
FullGcTimeOfCN PolarDB-X Full GC time Sum nanoseconds
LogicRTOfCN PolarDB-X compute layer logic response time Average μs
LogicRequestCountOfCN PolarDB-X compute layer logic request count Sum req/s
LogicSlowOfCN PolarDB-X compute layer logic slow SQL Sum req/s
MemUsageOfCN PolarDB-X compute layer memory utilization 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 utilization Average %
ConnUsageOfDN PolarDB-X storage node connection utilization Average %
DiskSizeOfDN PolarDB-X storage node disk usage Average Megabytes
DiskUsageOfDN PolarDB-X storage node disk utilization Average %
IOPSUsageOfDN PolarDB-X storage node IOPS utilization 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 utilization Average %
LogDiskSizeOfDN PolarDB-X storage node log disk usage Average Megabytes
MemUsageOfDN PolarDB-X storage node memory utilization 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 slave lag Average seconds
SlowQueriesOfDN PolarDB-X storage node slow queries per second Average countSecond
TempDiskTableCreatesOfDN PolarDB-X storage node temporary table creations per second Average countSecond
ThreadsConnectedOfDN PolarDB-X storage node thread connections 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 seen in 「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: The value of tags.name is the instance ID, used as a unique identifier

Tip 2: fields.message is a JSON serialized string ```