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 enable Guance Integration - Extensions - DataFlux Func (Automata): all prerequisites are automatically installed, please proceed with script installation
If deploying Func manually, refer to Manual Deployment of Func
Install MariaDB Collection Script¶
Note: Please prepare the required Tencent Cloud AK in advance (for simplicity, you can directly grant the global read-only permission
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 enter 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 script.
After enabling, you can see the corresponding automatic trigger configuration in 「Manage / Automatic Trigger Configuration」. Click 【Execute】 to execute it immediately without waiting for the scheduled time. Wait a moment, and you can view the execution task records and corresponding logs.
To collect corresponding logs, you also need to enable the corresponding log collection script. To collect bills, enable the cloud bill collection script.
Verification¶
- In 「Manage / Automatic Trigger Configuration」, confirm whether the corresponding task has the corresponding automatic trigger configuration, and you can also 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. You can collect more metrics through configuration Tencent Cloud Cloud Monitoring Metrics 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 values of all shards | GB | InstanceId |
BinlogUsedDisk | Used Binlog Disk Space | Instance-level monitoring metric, calculated by summing the used Binlog disk space of all shard master nodes | GB | InstanceId |
ConnUsageRate | DB Connection Usage Rate | Instance-level monitoring metric, taken as the maximum DB connection usage rate of all shard master and slave nodes | % | InstanceId |
CpuUsageRate | CPU Utilization Rate | Instance-level monitoring metric, taken as 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 all shard master nodes | GB | InstanceId |
DataDiskUsedRate | Data Disk Space Utilization Rate | Instance-level monitoring metric, taken as the maximum data disk space utilization rate of all shard master nodes | % | InstanceId |
DeleteTotal | DELETE Request Count | Instance-level monitoring metric, calculated by summing the Delete request counts of all shard master nodes | 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 |
times | 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 |
times | 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 |
times | InstanceId |
InnodbRowsDeleted |
innodb Executed DELETE Row Count |
Instance-level monitoring metric, calculated by summing the innodb executed DELETE row counts of all shard master nodes |
rows | InstanceId |
InnodbRowsInserted |
innodb Executed INSERT Row Count |
Instance-level monitoring metric, calculated by summing the innodb executed INSERT row counts of all shard master nodes |
rows | 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 |
rows | InstanceId |
InnodbRowsUpdated |
innodb Executed UPDATE Row Count |
Instance-level monitoring metric, calculated by summing the innodb executed UPDATE row counts of all shard master nodes |
rows | InstanceId |
InsertTotal | INSERT Request Count | Instance-level monitoring metric, calculated by summing the INSERT request counts of all shard master nodes | times/sec | InstanceId |
LongQueryCount | Slow Query Count | Instance-level monitoring metric, calculated by summing the slow query counts of all shard master nodes | times | InstanceId |
MemAvailable | Available Cache Space | Instance-level monitoring metric, calculated by summing the available cache space of all shard master nodes | GB | InstanceId |
MemHitRate | Cache Hit Rate | Instance-level monitoring metric, taken as the minimum cache hit rate of all shard master nodes | % | InstanceId |
ReplaceSelectTotal | REPLACE_SELECT Request Count | Instance-level monitoring metric, calculated by summing the REPLACE-SELECT request counts of all shard master nodes | times/sec | InstanceId |
ReplaceTotal | REPLACE Request Count | Instance-level monitoring metric, calculated by summing the REPLACE request counts of all shard master nodes | 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 delay of all slave nodes of this shard | seconds | InstanceId |
UpdateTotal | UPDATE Request Count | Instance-level monitoring metric, calculated by summing the UPDATE request counts of all shard master nodes | times/sec | InstanceId |
ThreadsConnected | Current Open Connections Count | Instance-level monitoring metric, calculated by summing the current open connections counts of all shard master and slave nodes | times | InstanceId |
ConnMax | Maximum Connections Count | Instance-level monitoring metric, calculated by summing the maximum connections counts of all shard master and slave nodes | count | InstanceId |
ClientConnTotal | Total Client Connections Count | Instance-level monitoring metric, calculated by summing all connections on the instance 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 with Duration (<5ms) | Instance-level monitoring metric, indicating the number of requests with execution time less than 5ms | times/sec | InstanceId |
TimeRange1 | Request Count with Duration (5~20ms) | Instance-level monitoring metric, indicating the number of requests with execution time 5-20ms | times/sec | InstanceId |
TimeRange2 | Request Count with Duration (20~30ms) | Instance-level monitoring metric, indicating the number of requests with execution time 20~30ms | times/sec | InstanceId |
TimeRange3 | Request Count with Duration (greater than 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 master-slave switches that occurred on the instance | times | InstanceId |
IOUsageRate | IO Utilization Rate | Instance-level monitoring metric, taken as the maximum IO utilization rate of all shard master nodes | % | InstanceId |
MaxSlaveCpuUsageRate | Maximum Slave Node CPU Utilization Rate | Instance-level monitoring metric, taken as the maximum CPU utilization rate of all slave nodes | % | InstanceId |
ThreadsRunningCount | Total Running Threads Count | Instance-level monitoring metric, taken as the sum of the Threads_running values of all nodes. Threads_running is the result of executing show status like 'Threads_running' | count | InstanceId |
Objects¶
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" : "Based on MariaDB 10.1 design (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: The fields in
tags
andfields
may change with subsequent updatesTip 1: The value of
tags.name
is used as the unique identifierTip 2:
fields.message
andfields.InstanceNode
are JSON serialized strings