Skip to content

Tencent Cloud SQLServer

Use the "Cloud Sync" series 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 preconditions are automatically installed, please proceed with script installation.

If you are deploying Func yourself, refer to Self-deploying Func

Enable Script

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

Enable Script in DataFlux Func (Automata)

  1. Log in to the Guance console.
  2. Click the "Integration" menu and select "Cloud Account Management".
  3. Click "Add Cloud Account", select "Tencent Cloud", and fill in the required information on the interface. If you have already configured the cloud account information, ignore this step.
  4. Click "Test". After the test is successful, click "Save". If the test fails, please check the relevant configuration information and test again.
  5. Click "Cloud Account Management". You can see the added cloud account in the list. Click the corresponding cloud account to enter the details page.
  6. Click the "Integration" button on the cloud account details page. In the "Not Installed" list, find "Tencent Cloud SQLServer" and click the "Install" button. The installation interface will pop up for installation.

Manually Enable Script

  1. Log in to the Func console, click "Script Market", enter the Guance script market, and search for integration_tencentcloud_sqlserver.

  2. Click "Install" and enter the corresponding parameters: Tencent Cloud AK, SK, and account name.

  3. Click "Deploy Startup Script". The system will automatically create the Startup script set and configure the corresponding startup scripts.

  4. 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. After a while, you can view the execution task records and corresponding logs.

Verification

  1. In "Manage / Automatic Trigger Configuration", confirm whether the corresponding task has the corresponding automatic trigger configuration. You can also check the corresponding task records and logs to see if there are any exceptions.
  2. In Guance, check if the asset information exists in "Infrastructure / Custom".
  3. 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
Cpu CPU Utilization Percentage of instance CPU consumption % resourceId
Transactions Transactions Average number of transactions per second times/sec resourceId
Connections Connections Average number of user connections to the database per second count resourceId
Requests Requests Number of requests per second times/sec resourceId
Logins Logins Number of logins per second times/sec resourceId
Logouts Logouts 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 Inbound Traffic Total size of all inbound packets KB/s resourceId
OutFlow Outbound Traffic Total size of all outbound packets KB/s resourceId
Iops Disk IOPS Number of disk read/write operations per second times/sec resourceId
DiskReads Disk Reads Number of disk reads per second times/sec resourceId
DiskWrites Disk Writes 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 Description Unit Dimensions
SlowQueries Slow Queries Number of queries that take more than 1 second to execute count resourceId
BlockedProcesses Blocked Processes Current number of blocked processes count resourceId
LockRequests Lock Requests Average number of lock requests per second times/sec resourceId
UserErrors User Errors Average number of errors per second times/sec resourceId
SqlCompilations SQL Compilations Average number of SQL compilations per second times/sec resourceId
SqlRecompilations SQL Recompilations Average number of SQL recompilations per second times/sec resourceId
FullScans Full Scans per Second Number of unrestricted full scans per second times/sec resourceId
BufferCacheHitRatio Buffer Cache Hit Ratio Data cache (memory) hit rate % resourceId
LatchWaits Latch Waits Number of latch waits per second times/sec resourceId
LockWaits Average Lock Wait Delay Average wait time for each lock request that causes a wait Ms resourceId
NetworkIoWaits IO Delay Time Average network IO delay time Ms resourceId
PlanCacheHitRatio Plan Cache Hit Ratio Each SQL has an execution plan, and the hit rate of the execution plan % resourceId
FreeStorage Free Disk Space Percentage of free disk space % resourceId

Objects

The data structure of the Tencent Cloud SQLServer objects collected 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 and fields may change with subsequent updates. Note 1: The value of tags.name is used as a unique identifier. Note 2: fields.message and fields.InstanceNode are JSON serialized strings.

Appendix

TencentCloud-SQLServer "Regions and Availability"

Please refer to the official Tencent documentation:

Feedback

Is this page helpful? ×