tencent cloud

TDSQL-C for MySQL

Release Notes and Announcements
Release Notes
Product Announcements
Beginner's Guide
Product Introduction
Overview
Strengths
Use Cases
Architecture
Product Specifications
Instance Types
Product Feature List
Database Versions
Regions and AZs
Common Concepts
Use Limits
Suggestions on Usage Specifications
Kernel Features
Kernel Overview
Kernel Version Release Notes
Optimized Kernel Version
Functionality Features
Performance Features
Security Features
Stability Feature
Analysis Engine Features
Inspection and Repair of Kernel Issues
Purchase Guide
Billing Overview
Product Pricing
Creating Cluster
Specification Adjustment Description
Renewal
Payment Overdue
Refund
Change from Pay-as-You-Go to Yearly/Monthly Subscription
Change from Pay-as-You-Go to Serverless Billing
Value-Added Services Billing Overview
Viewing Billing Statements
Getting Started
Database Audit
Overview
Viewing Audit Instance List
Enabling Audit Service
Viewing Audit Logs
Log Shipping
Post-Event Alarm Configuration
Modifying Audit Rule
Modifying Audit Service
Disabling Audit Service
Audit Rule Template
Viewing Audit Task
Authorizing Sub-User to Use Database Audit
Serverless Service
Serverless Introduction
Creating and Managing a Serverless Cluster
Elastic Scaling Management Tool
Serverless Resource Pack
Multi-AZ Deployment
Configuration Change
FAQs
Serverless Cost Estimator
Operation Guide
Operation Overview
Switching Cluster Page View in Console
Database Connection
Instance Management
Configuration Adjustment
Instance Mode Management
Cluster Management
Scaling Instance
Database Proxy
Account Management
Database Management
Database Management Tool
Parameter Configuration
Multi-AZ Deployment
GD
Backup and Restoration
Operation Log
Data Migration
Parallel Query
Columnar Storage Index (CSI)
Analysis Engine
Database Security and Encryption
Monitoring and Alarms
Basic SQL Operations
Connecting to TDSQL-C for MySQL Through SCF
Tag
Practical Tutorial
Classified Protection Practice for Database Audit of TDSQL-C for MySQL
Upgrading Database Version from MySQL 5.7 to 8.0 Through DTS
Usage Instructions for TDSQL-C MySQL
New Version of Console
Implementing Multiple RO Groups with Multiple Database Proxy Connection Addresses
Strengths of Database Proxy
Selecting Billing Mode for Storage Space
Creating Remote Disaster Recovery by DTS
Creating VPC for Cluster
Data Rollback
Solution to High CPU Utilization
How to Authorize Sub-Users to View Monitoring Data
White Paper
Security White Paper
Performance White Paper
Troubleshooting
Connection Issues
Performance Issues
API Documentation
History
Introduction
API Category
Making API Requests
Instance APIs
Multi-Availability Zone APIs
Other APIs
Audit APIs
Database Proxy APIs
Backup and Recovery APIs
Parameter Management APIs
Billing APIs
serverless APIs
Resource Package APIs
Account APIs
Performance Analysis APIs
Data Types
Error Codes
FAQs
Basic Concepts
Purchase and Billing
Compatibility and Format
Connection and Network
Features
Console Operations
Database and Table
Performance and Log
Database Audit
Between TDSQL-C for MySQL and TencentDB for MySQL
Service Agreement
Service Level Agreement
Terms of Service
TDSQL-C Policy
Privacy Policy
Data Privacy and Security Agreement
General References
Standards and Certifications
Glossary
Contact Us

Pulling Monitoring Data via TencentCloud API

PDF
Focus Mode
Font Size
Last updated: 2025-11-24 21:25:15
This document describes how to pull the monitoring metric data of TDSQL-C for MySQL through TencentCloud API. For detailed directions and more examples, see GetMonitorData.

API description

This API is used to get the monitoring data of TDSQL-C for MySQL by passing in its namespace, object dimension, and monitoring metric. API call rate limit: 20 calls/sec (1,200 calls/minute). A single request can get the data of up to 10 instances for up to 1,440 data points. This API may fail due to the rate limit if you need to call many metrics and objects. We recommend you distribute call requests across a period of time. The API request rate is limited to 20 requests/sec by default.

Input parameters

The list below only contains API request parameters and some common parameters. For a complete common parameter list, see Common Params.
Parameter Name
Required
Type
Description
Action
Yes
String
Common parameter. The value used for this API: GetMonitorData.
Version
Yes
String
Common parameter. The value used for this API: 2018-07-24.
Region
Yes
String
Common parameter. For more information, see the list of regions supported by the product.
Namespace
Yes
String
Namespace, such as QCE/cynosdb_mysql. For more information, see TDSQL-C for MySQL Monitoring Metrics.
MetricName
Yes
String
Metric name, such as CPUUsagerate (CPU utilization). You can pull the data of one single metric at a time.
Instances.N
Yes
Array of Instance
Dimension combination of instance object in the format of key-value pair. Different types of instances have completely different fields. For the dimension combination of TDSQL-C for MySQL, see TDSQL-C for MySQL Monitoring Metrics.
Period
No
Integer
Statistical period for monitoring data in seconds, such as 60. Default value: 300.
StartTime
No
Timestamp ISO8601
Start time, such as 2021-07-15T19:51:23+08:00.
EndTime
No
Timestamp ISO8601
End time, which is the current time by default, such as 2021-07-15T20:51:23+08:00. EndTime cannot be earlier than StartTime.

Output parameters

Parameter Name
Type
Description
Period
Integer
Statistical period
MetricName
String
Metric name
DataPoints
Array of DataPoint
Array of data points
StartTime
Timestamp ISO8601
Start time
EndTime
Timestamp ISO8601
End time
RequestId
String
The unique request ID, which is returned for each request and is required for troubleshooting.

Examples

This example shows you how to get the 5-minute CPU utilization monitoring data of a TDSQL-C for MySQL instance in a specific period of time. Sample input
POST / HTTP/1.1
Host: monitor.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: GetMonitorData
<Common request parameters>

{
"Namespace": "QCE/cynosdb_mysql",
"MetricName": "CPuUsageRate",
"Period": 3600,
"Instances": [
{
"Dimensions": [
{
"Name": "InstanceId",
"Value": "cynosdbmysql-ins-edpn3t6b"
}
]
}
],
"StartTime": "2022-07-15T10:00:00",
"EndTime": "2022-07-15T15:00:00"
}
Sample output
{
"Response": {
"DataPoints": [
{
"Dimensions": [
{
"Name": "InstanceId",
"Value": "cynosdbmysql-ins-edpn3t6b"
}
],
"Timestamps": [
1657850400,
1657854000,
1657857600,
1657861200,
1657864800
],
"Values": [
0.26,
0.24,
0.23,
0.26,
0.24
]
}
],
"EndTime": "7/15/2022 3:00:00 PM",
"MetricName": "CPuUsageRate",
"Period": 3600,
"RequestId": "71c72744-bec5-49d0-b42c-433609ab4166"
"StartTime": "7/15/2022 10:00:00 AM"
}
}

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback