文档中心 > GetMetricsData
GetMetricsData

最近更新时间:2022-09-27

请求方法:GET

接口描述:获取监控数据

请求参数

名称

类型

是否必选

示例值

描述

Action

String

GetMetricsData

系统规定参数。取值:GetMetricsData

DBInstanceId

String

mysql-lv1xxxxxxx

数据库实例ID

StartTime

String

2020-08-14   12:00

开始时间

EndTime

String

2020-08-15   12:00

结束时间

Metrics

String

dbaas_mysql_node_cpu_usage

指标,多个指标用,隔开

NodeId

String

mysql-lv1xxxxxxx_node_node1

节点Id

返回参数

状态码:200

名称

类型

示例值

描述

RequestId

String

rm-uf6wjk5xxxxxxxxxx

请求ID

Items

Array

[]

由监控信息组成的数组

-Metrics

String

dbaas_postgres_node_cpu_usage

指标,多个指标用,隔开

-Data

Array

[]

该指标监控数据信息组成的数组

-   Data

String

2022-08-10   13:42:12

时间

-   Value

Double

0.6

数值

示例

请求示例

GET https://api.unicloud.com/api/rds?

Action=GetMetricsData

&DBInstanceId=pgsql-xxxxxxxxxxx

&Metrics=dbaas_postgres_node_cpu_usage

返回示例

{

"RequestId": "b9de1a62-d09e-4d34-9a61-38f0f56564b6",

"Items": [

          {

                   "Metric": "dbaas_windows_net_bytes_received_total_rate",

                   "Data": [

                            {

                                     "Data": "2022-08-18 12:32:05",

                                     "Value": 0

                            },

                            {

                                     "Data": "2022-08-18 12:33:05",

                                     "Value": 0

                            },

                            {

                                     "Data": "2022-08-18 12:34:05",

                                     "Value": 0

                            },

                            {

                                     "Data": "2022-08-18 12:35:05",

                                     "Value": 0

                            },

                            {

                                     "Data": "2022-08-18 12:36:05",

                                     "Value": 0

                            },

                            {

                                     "Data": "2022-08-18 12:37:05",

                                     "Value": 0

                            }   ......    

        ]

          }

]

}