Volcengine SQL Server¶
Use Func to collect instance configuration and cloud monitoring data for Volcengine RDS for SQL Server. On-call operators can review instance status, batch requests per second, user errors, and CPU and disk utilization, then use the instance ID to drill into transactions, connections, storage, and lock contention.
Configuration¶
Permissions¶
Configure Func with a Volcengine access key that has the following read permissions. Make sure the permissions cover the instances in the selected projects.
| Service | API | Purpose |
|---|---|---|
RDS for SQL Server (rds_mssql) |
DescribeDBInstances, version 2022-01-01 |
List instances, their status, and their configuration by region, with pagination. |
Cloud Monitor (cloudmonitor) |
GetMetricData, version 2018-01-01 |
Read monitoring data for each instance. You can use the predefined CloudMonitorReadOnlyAccess policy. |
Func also accesses the public Volcengine Cloud Monitor metric catalog, ListMetricDocs, to match the cloud API metric names. If the catalog is unavailable, the collection script uses the metric names explicitly listed in its configuration. SQL Server API overview · Cloud Monitor permissions
Install Func¶
In Guance, we recommend enabling hosted Func under Integrations > Extensions > Hosted Func. All prerequisites are installed automatically, so you can proceed with script installation.
For a self-hosted deployment, see Deploy Func yourself.
Enable the script¶
Tip: Prepare a Volcengine access key and grant the permissions listed in Permissions before proceeding.
Enable the script in hosted Func¶
- Sign in to the Guance console.
- Open Integrations and select Cloud Account Management.
- Select Add Cloud Account, choose Volcengine, and fill in the required information. Skip this step if you already configured the cloud account.
- Select Test, then select Save if the test succeeds. If it fails, check the configuration and try again.
- In Cloud Account Management, select the added account to open its details page.
- On the cloud account details page, select Integrations. Find
Volcengine SQL Serverin theNot Installedlist, select Install, and complete the installation in the dialog.
Enable the script manually¶
-
Sign in to the Func console, open Script Market, and search for
integration_volcengine_sqlserverin the Guance Script Market. -
Select Install and enter the Volcengine AK ID, AK Secret, and account name.
-
Select Deploy Startup Script. The system automatically creates the
Startupscript set and configures the corresponding startup script. -
Once enabled, the trigger appears under Management / Automatic Trigger Configuration. Select Run to execute it immediately. After a short wait, check the execution history and the corresponding logs.
Verify¶
- In Management / Automatic Trigger Configuration, verify that the task has a trigger configured. Review its execution history and logs for errors.
- In Guance, check Infrastructure / Custom for instance inventory.
- In Guance, check Metrics for the corresponding monitoring data.
Metrics¶
The measurement is volcengine_vcm_rds_sqlserver. All 25 fields below were verified in the workspace and are of type float. The Default column indicates whether the integration's dashboard or monitors use the field. Per-second rates are read directly from the cloud. Disk capacity is in GiB and percentages use a 0–100 scale. Volcengine monitoring metrics
Resource metrics (resource)¶
| Field | API Metric Name | Unit | Default | Description |
|---|---|---|---|---|
cpu_util |
CpuUtil |
% | Yes | Percentage of the instance's CPU capacity in use. |
mem_util |
MemUtil |
% | Yes | Percentage of instance memory in use. Compare with the buffer cache hit ratio when investigating memory pressure. |
disk_util |
DiskUtil |
% | Yes | Used cloud disk space as a percentage of purchased capacity. |
disk_total_size |
DiskTotalSize |
GiB | Yes | Total instance disk capacity reported by Cloud Monitor. |
disk_used_size |
DiskUsedSize |
GiB | Yes | Used disk capacity reported by Cloud Monitor. |
avg_disk_queue_length |
AvgDiskQueueLength |
Count/s (as documented) | No | Average disk queue length measured by Volcengine. Use it to track trends for the same instance. |
network_receive_throughput |
NetworkReceiveThroughput |
B/s | No | Network bytes received per second. |
network_transmit_throughput |
NetworkTransmitThroughput |
B/s | No | Network bytes sent per second. |
iops |
IOPS |
operations/s | Yes | I/O requests processed by the disk per second. |
Engine metrics (engine)¶
| Field | API Metric Name | Unit | Default | Description |
|---|---|---|---|---|
connections_in_use |
ConnectionsInUse |
count | Yes | Current user connections to the engine. Sample averages can be fractional. |
tps |
TPS |
transactions/s | Yes | Transactions started per second. |
qps |
QPS |
batches/s | Yes | T-SQL command batches received per second. A batch can contain multiple statements. |
logins |
Logins |
events/s | No | Logins established per second. Use this to detect frequent connection creation. |
cache_hit_ratio |
CacheHitRatio |
% | Yes | Percentage of data page reads served by the buffer cache. |
full_scans |
FullScans |
events/s | No | Full table or index scans per second. |
errors |
Errors |
events/s | Yes | User errors reported by SQL Server per second. |
latch_waits |
LatchWaits |
events/s | No | Rate at which latch requests have to wait. |
lock_waits |
LockWaits |
events/s | Yes | Lock requests that have to wait per second. |
lock_requests |
LockRequests |
events/s | No | Requests to acquire a new lock or convert an existing lock per second. |
lock_timeouts |
LockTimeouts |
events/s | Yes | Lock waits that time out per second. |
dead_locks |
DeadLocks |
events/s | Yes | Deadlocks per second caused by transactions waiting on each other's resources. |
checkpoint_pages |
CheckpointPages |
pages/s | No | Modified pages flushed to disk per second by checkpoints and similar operations. |
sql_compilations |
SqlCompilations |
events/s | No | SQL compilations per second. |
sql_recompilations |
SqlRecompilations |
events/s | No | Statement recompilations per second. |
instance_object_difference |
InstanceObjectDifference |
count | No | Number of objects that differ between the primary and standby nodes. |
Metric tags¶
| Tag | Purpose |
|---|---|
account_name, cloud_provider |
Cloud account name and collection source. |
region_id, project_name |
Region and associated project. |
instance_id, instance_name |
Used to link the instance inventory. Names can change, so monitors distinguish instances by ID. |
resource_id |
Resource identifier returned by Cloud Monitor. The collector uses it to link objects. |
subnamespace |
engine for engine metrics and resource for resource metrics. |
Objects¶
The custom object class is volcengine_sqlserver. The script uses the API's InstanceId as the object name. The following is a sanitized example of the object structure.
{
"measurement": "volcengine_sqlserver",
"tags": {
"name": "mssql-example",
"instance_id": "mssql-example",
"instance_name": "orders-db",
"region_id": "cn-beijing",
"project_name": "example",
"account_name": "example-account",
"cloud_provider": "volcengine"
},
"fields": {
"instance_type": "HA",
"zone_id": "cn-beijing-a",
"instance_status": "Running",
"vpc_id": "vpc-example",
"subnet_id": "subnet-example",
"dbengine_version": "SQLServer_2019_Std",
"storage_type": "LocalSSD",
"storage_space": 20,
"node_spec": "<Node Specification>",
"port": "1433",
"instance_create_time": "2026-01-01T00:00:00Z",
"charge_detail": "{\"charge_type\":\"PostPaid\"}",
"message": "{\"InstanceId\":\"mssql-example\",\"InstanceStatus\":\"Running\",\"StorageSpace\":20}"
}
}