tencent cloud

Tencent Cloud Observability Platform

Release Notes and Announcements
Release Notes
Product Introduction
Overview
Strengths
Basic Features
Basic Concepts
Use Cases
Use Limits
Purchase Guide
Tencent Cloud Product Monitoring
Application Performance Management
Mobile App Performance Monitoring
Real User Monitoring
Cloud Automated Testing
Prometheus Monitoring
Grafana
EventBridge
PTS
Quick Start
Monitoring Overview
Instance Group
Tencent Cloud Product Monitoring
Application Performance Management
Real User Monitoring
Cloud Automated Testing
Performance Testing Service
Prometheus Getting Started
Grafana
Dashboard Creation
EventBridge
Alarm Service
Cloud Product Monitoring
Tencent Cloud Service Metrics
Operation Guide
CVM Agents
Cloud Product Monitoring Integration with Grafana
Troubleshooting
Practical Tutorial
Application Performance Management
Product Introduction
Access Guide
Operation Guide
Practical Tutorial
Parameter Information
FAQs
Mobile App Performance Monitoring
Overview
Operation Guide
Access Guide
Practical Tutorial
Tencent Cloud Real User Monitoring
Product Introduction
Operation Guide
Connection Guide
FAQs
Cloud Automated Testing
Product Introduction
Operation Guide
FAQs
Performance Testing Service
Overview
Operation Guide
Practice Tutorial
JavaScript API List
FAQs
Prometheus Monitoring
Product Introduction
Access Guide
Operation Guide
Practical Tutorial
Terraform
FAQs
Grafana
Product Introduction
Operation Guide
Guide on Grafana Common Features
FAQs
Dashboard
Overview
Operation Guide
Alarm Management
Console Operation Guide
Troubleshooting
FAQs
EventBridge
Product Introduction
Operation Guide
Practical Tutorial
FAQs
Report Management
FAQs
General
Alarm Service
Concepts
Monitoring Charts
CVM Agents
Dynamic Alarm Threshold
CM Connection to Grafana
Documentation Guide
Related Agreements
Application Performance Management Service Level Agreement
APM Privacy Policy
APM Data Processing And Security Agreement
RUM Service Level Agreement
Mobile Performance Monitoring Service Level Agreement
Cloud Automated Testing Service Level Agreement
Prometheus Service Level Agreement
TCMG Service Level Agreements
PTS Service Level Agreement
PTS Use Limits
Cloud Monitor Service Level Agreement
API Documentation
History
Introduction
API Category
Making API Requests
Monitoring Data Query APIs
Alarm APIs
Legacy Alert APIs
Notification Template APIs
TMP APIs
Grafana Service APIs
Event Center APIs
TencentCloud Managed Service for Prometheus APIs
Monitoring APIs
Data Types
Error Codes
Glossary

Using API to Pull Tencent Cloud Service Monitoring Data

PDF
Focus Mode
Font Size
Last updated: 2024-01-27 17:45:42
This document describes how to use APIs to pull the monitoring data of Tencent Cloud services.

API Overview

Tencent Cloud Observability Platform provides the following two types of APIs for querying metric monitoring data

API
Operation
Description
Queries the details of basic monitoring metric
This API is used to query the types of basic monitoring metrics under the corresponding namespace
Pulls metric monitoring data
This API is used to get the corresponding monitoring data of a metric in the object dimension

API limits

The GetMonitorData API supports getting the monitoring data of a certain metric for all instances under an account in batches.
The GetMonitorData API can be called 20 times per second (1,200 times/minute) by default. A single request can get the data of up to 10 instances and up to 1,440 data points.
The retention period of monitoring data varies by monitoring granularity as detailed below:
Monitoring Granularity
Retention Period
1 second
1 day
1 minute
15 days
5 minutes
31 days
1 hour
93 days
1 day
186 days
Note:
The monitoring data of 1-minute metrics related to CPU, memory, and network for CVM is retained for 31 days.

Preparations

Preparing personal key

1. Go to Manage API Key.
2. If no key has been created, you need to click Create Key to create a key. If you have already created a key, you can click Display after SecretKey to get the key.



Preparing Tencent Cloud service metric information

This document takes the CVM CPU utilization metric as an example.
2. Find the CPU utilization metric to view the CPU utilization metric name, dimension, statistical period, and other related information.




Directions

This demo describes how to use the GetMonitorData API to query the CPU utilization of a CVM instance.
1. Log in to API Explorer.
2. Copy the prepared personal key into the corresponding SecretId and SecretKey text boxes.
3. Find Region in the Input Parameters section and select the relevant region.
4. Enter the prepared Tencent Cloud service information in the corresponding text boxes in the Input Parameters section.
Namespace: enter QCE/CVM.
MetricName: enter the name of the CPU utilization metric, i.e., CPUUsage.
Dimensions.N-Name: enter the supported dimension name, i.e., InstanceId.
Dimensions.N-Value: enter the corresponding InstanceId value (CVM instance ID), such as ins—12345678, which can be obtained through the DescribeInstances API of CVM.
Period: enter a statistical period supported by the metric, such as 300.
StartTime: enter the query start time in the format of 2020-12-20T19:51:23+08:00 (in the datetime_iso type).
EndTime: enter the query end time in the format of 2020-12-20T20:51:23+08:00 (in the datetime_iso type). EndTime cannot be earlier than StartTime.


5. After completing the above information, you can copy the code in the corresponding language on the Code Generation tab to integrate the relevant monitoring data into your self-built monitoring system. You can also use Online Call to send a request to query the monitoring data online.

Help and Support

Was this page helpful?

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

Feedback