云数据库 RDS-云数据库RDS监控指标说明:调用样例

时间:2024-11-01 14:53:22

调用样例

通过API接口来检索RDS监控指标数据,具体调用方法及参数说明请参见《 云监控服务 API参考》中的查询监控数据章节。

调用样例如下:

  • 请求样例:
/V1.0/{project_id}/metric-data?namespace=SYS.RDS&metric_name=rds001_cpu_util&dim.0=rds_cluster_id,5ea170ad-cc6b-49cd-9020-e94fdbeea391&from=1484123686000&to=1568188853000&period=300&filter=average
  • 响应样例:
{
    "datapoints": [
        {
            "average": 0.35, 
            "timestamp": 1484123400000, 
            "unit": "Ratio"
        },
        {
            "average": 0.11, 
            "timestamp": 1484123700000, 
            "unit": "Ratio"
        }
    ], 
    "metric_name": "rds001_cpu_util",
    "httpcode" : 200,
    "header" : {
    "Transfer-Encoding" : "chunked",
    "Server" : "Web Server",
    "X-Request-Id" : "te-I- CES -APISVR25.id-0418d62a-1e76-46ff-9a5f-9ce40b336e29.ts-1484123744291.c-15046",
    "X-Content-Type-Options" : "nosniff",
    "Connection" : "keep-alive",
    "X-Download-Options" : "noopen",
    "Date" : "Wed, 11 Jan 2017 08:35:44 GMT",
    "X-Frame-Options" : "DENY",
    "Strict-Transport-Security" : "max-age=31536000; includeSubdomains;",
    "Cache-Control" : "no-cache",
    "X-XSS-Protection" : "1; mode=block;",
    "Content-Length" : "165",
    "Content-Type" : "application/json"
}
}
support.huaweicloud.com/api-rds/rds_10_0204.html