Tencent Cloud MariaDB¶
Use the "Cloud Sync" series of script packages in the script market to synchronize cloud monitoring and cloud asset data to Guance
Configuration¶
Install Func¶
It is recommended to activate the Guance Integration - Extensions - DataFlux Func (Automata): all prerequisites are automatically installed, please proceed with the script installation.
If deploying Func manually, refer to Manual Deployment of Func
Install MariaDB Collection Script¶
Note: Please prepare the Tencent Cloud AK in advance (for simplicity, you can directly grant global read-only permissions
ReadOnlyAccess).
To synchronize MariaDB monitoring data, we install the corresponding collection script: "Guance Integration (Tencent Cloud-MariaDB Collection)" (ID: integration_tencentcloud_mariadb).
Click [Install], then input the corresponding parameters: Tencent Cloud AK, Tencent Cloud account name.
Click [Deploy Startup Script], the system will automatically create the Startup script set and configure the corresponding startup scripts.
After enabling, you can see the corresponding automatic trigger configuration in "Management / Automatic Trigger Configuration". Click [Execute] to immediately execute it once without waiting for the scheduled time. After a short wait, you can view the execution task records and corresponding logs.
If you want to collect corresponding logs, you also need to enable the corresponding log collection script. If you want to collect bills, you need to enable the cloud bill collection script.
Verification¶
- In "Management / 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.
- In Guance, check if asset information exists in "Infrastructure / Custom".
- In Guance, check if there is corresponding monitoring data in "Metrics".
Metrics¶
After configuring Tencent Cloud Cloud Monitoring, the default Measurement is as follows. More metrics can be collected through configuration. Tencent Cloud Cloud Monitoring Metric Details
Monitoring Metrics¶
| Metric Name | Metric Chinese Name | Description | Unit | Dimensions |
|---|---|---|---|---|
| ActiveThreadCount | Active Thread Count | Instance level monitoring metric, calculated by summing the active thread counts of all shard master and slave nodes | count | InstanceId |
| BinlogDiskAvailable | Remaining Binlog Disk Space | Instance level monitoring metric, calculated by summing the BinlogDiskAvailableShard metric monitoring values of each shard | GB | InstanceId |
| BinlogUsedDisk | Used Binlog Disk Space | Instance level monitoring metric, calculated by summing the used Binlog disk space of each shard's master node | GB | InstanceId |
| ConnUsageRate | DB Connection Usage Rate | Instance level monitoring metric, the value is the maximum DB connection usage rate of all shard master and slave nodes | % | InstanceId |
| CpuUsageRate | CPU Utilization Rate | Instance level monitoring metric, the value is the maximum CPU usage rate of all shard master nodes | % | InstanceId |
| DataDiskAvailable | Available Data Disk Space | Instance level monitoring metric, calculated by summing the available data disk space of each shard's master node | GB | InstanceId |
| DataDiskUsedRate | Data Disk Space Utilization Rate | Instance level monitoring metric, the value is the maximum data disk space utilization rate of each shard's master node | % | InstanceId |
| DeleteTotal | DELETE Request Count | Instance level monitoring metric, calculated by summing the DELETE request counts of each shard's master node | times/sec | InstanceId |
InnodbBufferPoolReads |
innodb Disk Read Page Count |
Instance level monitoring metric, calculated by summing the innodb disk read page counts of all shard master and slave nodes |
count | InstanceId |
InnodbBufferPoolReadAhead |
innodb Buffer Pool Pre-read Page Count |
Instance level monitoring metric, calculated by summing the innodb buffer pool pre-read page counts of all shard master and slave nodes |
count | InstanceId |
InnodbBufferPoolReadRequests |
innodb Buffer Pool Read Page Count |
Instance level monitoring metric, calculated by summing the innodb buffer pool read page counts of all shard master and slave nodes |
count | InstanceId |
InnodbRowsDeleted |
innodb Executed DELETE Row Count |
Instance level monitoring metric, calculated by summing the innodb executed DELETE row counts of each shard's master node |
row | InstanceId |
InnodbRowsInserted |
innodb Executed INSERT Row Count |
Instance level monitoring metric, calculated by summing the innodb executed INSERT row counts of each shard's master node |
row | InstanceId |
InnodbRowsRead |
innodb Executed READ Row Count |
Instance level monitoring metric, calculated by summing the innodb executed READ row counts of all shard master and slave nodes |
row | InstanceId |
InnodbRowsUpdated |
innodb Executed UPDATE Row Count |
Instance level monitoring metric, calculated by summing the innodb executed UPDATE row counts of each shard's master node |
row | InstanceId |
| InsertTotal | INSERT Request Count | Instance level monitoring metric, calculated by summing the INSERT request counts of each shard's master node | times/sec | InstanceId |
| LongQueryCount | Slow Query Count | Instance level monitoring metric, calculated by summing the slow query counts of each shard's master node | count | InstanceId |
| MemAvailable | Available Cache Space | Instance level monitoring metric, calculated by summing the available cache space of each shard's master node | GB | InstanceId |
| MemHitRate | Cache Hit Rate | Instance level monitoring metric, the value is the minimum cache hit rate of each shard's master node | % | InstanceId |
| ReplaceSelectTotal | REPLACE_SELECT Request Count | Instance level monitoring metric, calculated by summing the REPLACE-SELECT request counts of each shard's master node | times/sec | InstanceId |
| ReplaceTotal | REPLACE Request Count | Instance level monitoring metric, calculated by summing the REPLACE request counts of each shard's master node | times/sec | InstanceId |
| RequestTotal | Total Request Count | Instance level monitoring metric, calculated by summing the total request counts of all master nodes and the SELECT request counts of all slave nodes | times/sec | InstanceId |
| SelectTotal | SELECT Request Count | Instance level monitoring metric, calculated by summing the SELECT request counts of all shard master and slave nodes | times/sec | InstanceId |
| SlaveDelay | Slave Delay | Instance level monitoring metric, first calculate the slave delay of each shard, then take the maximum value as the slave delay of this instance. The slave delay of a shard is the minimum value of all slave node delays of this shard | sec | InstanceId |
| UpdateTotal | UPDATE Request Count | Instance level monitoring metric, calculated by summing the UPDATE request counts of each shard's master node | times/sec | InstanceId |
| ThreadsConnected | Current Open Connections | Instance level monitoring metric, calculated by summing the current open connections of all shard master and slave nodes | count | InstanceId |
| ConnMax | Maximum Connections | Instance level monitoring metric, calculated by summing the maximum connections of all shard master and slave nodes | count | InstanceId |
| ClientConnTotal | Total Client Connections | Instance level monitoring metric, calculated by summing all connections on the instance's Proxy. This metric truly shows how many clients are connected to the database instance | count | InstanceId |
| SQLTotal | Total SQL Count | Instance level monitoring metric, indicating how many SQL statements are sent to the database instance | count | InstanceId |
| ErrorSQLTotal | SQL Error Count | Instance level monitoring metric, indicating how many SQL statements have execution errors | count | InstanceId |
| SuccessSQLTotal | Successful SQL Count | Instance level monitoring metric, indicating the number of successfully executed SQL statements | count | InstanceId |
| TimeRange0 | Request Count (<5ms) | Instance level monitoring metric, indicating the number of requests with execution time less than 5ms | times/sec | InstanceId |
| TimeRange1 | Request Count (5~20ms) | Instance level monitoring metric, indicating the number of requests with execution time 5-20ms | times/sec | InstanceId |
| TimeRange2 | Request Count (20~30ms) | Instance level monitoring metric, indicating the number of requests with execution time 20~30ms | times/sec | InstanceId |
| TimeRange3 | Request Count (>30ms) | Instance level monitoring metric, indicating the number of requests with execution time greater than 30ms | times/sec | InstanceId |
| MasterSwitchedTotal | Master-Slave Switch Count | Instance level monitoring metric, indicating the number of times master-slave switching has occurred for the instance | count | InstanceId |
| IOUsageRate | IO Utilization Rate | Instance level monitoring metric, the value is the maximum IO utilization rate of each shard's master node | % | InstanceId |
| MaxSlaveCpuUsageRate | Maximum Slave Node CPU Utilization Rate | Instance level monitoring metric, the value is the maximum CPU utilization rate of all slave nodes | % | InstanceId |
| ThreadsRunningCount | Total Running Thread Count | Instance level monitoring metric, the value is the sum of the Threads_running values of all nodes of the instance. Threads_running is the result of executing show status like 'Threads_running' | count | InstanceId |
Object¶
The collected Tencent Cloud MariaDB object data structure can be seen in "Infrastructure - Custom".
{
"measurement": "tencentcloud_mariadb",
"tags": {
"AppId": "1311xxx185",
"AutoRenewFlag" : "0",
"DbEngine" : "MariaDB",
"DbVersion" : "10.1",
"DbVersionId" : "10.1",
"InstanceId" : "tdsql-ewqokixxxxxhu",
"InstanceName" : "tdsql-ewqoxxxxxxihu",
"InstanceType" : "2",
"Paymode" : "postpaid",
"ProjectId" : "0",
"RegionId" : "ap-shanghai",
"Status" : "0",
"StatusDesc" : "Creating",
"TdsqlVersion" : "Designed based on MariaDB 10.1 (Compatible with Mysql 5.6)",
"Uin" : "100xxxx113474",
"Vip" : "",
"Vport" : "3306",
"WanDomain" : "",
"WanPort" : "0",
"WanVip" : "",
"Zone" : "ap-shanghai-5",
"name" : "tdsql-ewqokihu",
"WanVIP" : ""
},
"fields": {
"Cpu" : 1,
"CreateTime" : "2023-08-17 17:55:03",
"Memory" : 2,
"NodeCount" : 2,
"PeriodEndTime" : "0001-01-01 00:00:00",
"Qps" : 2100,
"Storage" : 10,
"UpdateTime" : "2023-08-17 17:55:03",
"message" : "{Instance JSON Data}"
}
}
Note: Fields in
tagsandfieldsmay change with subsequent updatesTip 1:
tags.namevalue is used as the unique identifierTip 2:
fields.messageandfields.InstanceNodeare JSON serialized strings