Tencent Cloud SQLServer¶
Use the "Cloud Synchronization" series of script packages in the script market to synchronize cloud monitoring and cloud asset data to TrueWatch
Configuration¶
Install Func¶
It is recommended to activate the TrueWatch Integration - Extensions - DataFlux Func (Automata): All prerequisites are automatically installed, please proceed with the script installation.
If you are deploying Func yourself, refer to Self-deploying Func
Install SQLServer Collection Script¶
Note: Please prepare the Tencent Cloud AK in advance (for simplicity, you can directly grant the global read-only permission
ReadOnlyAccess
).
To synchronize SQLServer monitoring data, we install the corresponding collection script: "TrueWatch Integration (Tencent Cloud-SQL Server Collection)" (ID: integration_tencentcloud_sqlserver
).
After clicking 【Install】, 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. Wait a moment, and 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 automatic trigger configuration, and you can also view the corresponding task records and logs to check for any exceptions.
- In TrueWatch, check if the asset information exists in "Infrastructure / Custom".
- In TrueWatch, 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 | Meaning | Unit | Dimensions |
---|---|---|---|---|
Cpu |
CPU Utilization | Percentage of instance CPU consumption | % | resourceId |
Transactions | Transaction Count | Average number of transactions per second | times/sec | resourceId |
Connections | Connection Count | Average number of user connections to the database per second | count | resourceId |
Requests | Request Count | Number of requests per second | times/sec | resourceId |
Logins | Login Count | Number of logins per second | times/sec | resourceId |
Logouts | Logout Count | Number of logouts per second | times/sec | resourceId |
Storage | Used Storage Space | Total space occupied by instance database files and log files | GB | resourceId |
InFlow | Input Traffic | Total size of input packets for all connections | KB/s | resourceId |
OutFlow | Output Traffic | Total size of output packets for all connections | KB/s | resourceId |
Iops | Disk IOPS | Number of disk read/write operations per second | times/sec | resourceId |
DiskReads | Disk Read Count | Number of disk reads per second | times/sec | resourceId |
DiskWrites | Disk Write Count | Number of disk writes per second | times/sec | resourceId |
ServerMemory | Memory Usage | Actual memory consumption | MB | resourceId |
Performance Optimization Metrics¶
Metric Name | Metric Chinese Name | Meaning | Unit | Dimensions |
---|---|---|---|---|
SlowQueries | Slow Queries | Number of queries taking more than 1 second to run | count | resourceId |
BlockedProcesses | Blocked Process Count | Current number of blocked processes | count | resourceId |
LockRequests | Lock Request Count | Average number of lock requests per second | times/sec | resourceId |
UserErrors | User Error Count | Average number of errors per second | times/sec | resourceId |
SqlCompilations | SQL Compilation Count | Average number of SQL compilations per second | times/sec | resourceId |
SqlRecompilations | SQL Recompilation Count | Average number of SQL recompilations per second | times/sec | resourceId |
FullScans | Full Table Scan Count | Number of unrestricted full table scans per second | times/sec | resourceId |
BufferCacheHitRatio | Buffer Cache Hit Ratio | Data cache (memory) hit rate | % | resourceId |
LatchWaits | Latch Wait Count | Number of latch waits per second | times/sec | resourceId |
LockWaits | Average Lock Wait Delay | Average wait time for each lock request causing a wait | Ms | resourceId |
NetworkIoWaits | IO Delay Time | Average network IO delay time | Ms | resourceId |
PlanCacheHitRatio | Execution Cache Hit Ratio | Each SQL has an execution plan, the hit rate of the execution plan | % | resourceId |
FreeStorage | Free Disk Space | Percentage of free disk space | % | resourceId |
Objects¶
The collected Tencent Cloud SQLServer object data structure can be seen in "Infrastructure-Custom"
{
"measurement": "tencentcloud_sqlserver",
"tags": {
"BackupCycleType": "daily",
"CrossBackupEnabled": "disable",
"InstanceId" : "mssql-nmquc",
"InstanceType" : "SI",
"Model" : "2",
"PayMode" : "0",
"Pid" : "10036",
"ProjectId" : "0",
"Region" : "ap-shanghai",
"RegionId" : "ap-shanghai",
"RenewFlag" : "0",
"Status" : "2",
"SubnetId" : "68021",
"Type" : "CLOUD_BSSD",
"Uid" : "gamedb.sh1000.cdb.db",
"UniqSubnetId" : "subnet-b",
"UniqVpcId" : "vpc-xxxxx",
"Version" : "2016SP1",
"VersionName" : "SQL Server 2016 Enterprise",
"Vip" : "xxxxx",
"VpcId" : "80484",
"Vport" : "14",
"Zone" : "ap-shanghai-2",
"ZoneId" : "200002",
"account_name" : "Tencent Cloud Account",
"cloud_provider" : "tencentcloud",
"name" : "mssql-nmqu"
},
"fields": {
"Cpu" : "2",
"CreateTime" : "2023-07-20 14:07:05",
"EndTime" : "0000-00-00 00:00:00",
"IsolateTime" : "0000-00-00 00:00:00",
"Memory" : "4",
"StartTime" : "2023-07-20 14:07:05",
"Storage" : "20",
"UpdateTime" : "2023-07-20 14:14:13",
"UsedStorage" : "0",
"message" : "{Instance JSON Data}"
}
}
Note: The fields in
tags
,fields
may change with subsequent updates. Note 1:tags.name
value as the unique identifier. Note 2:fields.message
,fields.InstanceNode
are JSON serialized strings.
Appendix¶
TencentCloud-SQLServer「Regions and Availability」¶
Please refer to the official Tencent documentation: