Query Real-Time Index Monitoring Data

Last updated: 2019-11-29 19:21:51

PDF

1. API Description

This API (GetMonitorRealtimeData) is used to obtain real-time monitoring data of the metric. The statistical result of the data you reported that is analyzed using specified statistical method within the most recent period (300 seconds) will be returned.

Domain name: monitor.api.qcloud.com

2. Input Parameters

The following request parameter list only provides API request parameters. Common request parameters are also needed when the API is called. The Action field for this API is GetMonitorRealtimeData.

Parameter Name Required Type Description
namespace Yes String Namespace. This can be queried by calling the API Query Namespace (DescribeNamespace)
metricName Yes String Metric name. This can be queried by calling the API Query Metric (DescribeMetric)
dimensions.N.name Yes String Group of dimension names. You can call the API Query Metric Object List (DescribeMetric) to query all the dimensions or part of the aggregated dimensions under the metric
dimensions.N.value Yes String Group of dimension values. You can call the API Query Metric Object List (DescribeObjects) to query the dimension values corresponding to the dimension names
statistics Yes String Statistical method. This can be queried by calling the API Query Metric (DescribeMetric). Enter the statistical method of the metric
period Yes Int Statistical period. Currently you can only enter 300

3. Output Parameters

Parameter Name Type Description
code Int Error code, 0: Successful. Other values: Failed. For more information, please see Common Error Codes on the Error Codes page
message String Error message
data array Specific information of object

"data" is composed as follows:

Parameter Name Type Description
dimensions.name&dimensions.value String The string comprised of dimension and its value with & in between
value Int Statistical result
updateTime datetime End time of data analysis

4. Example

Input

https://monitor.api.qcloud.com/v2/index.php?
&<Common request parameters>
&namespace=cvm
&metricName=diskusage
&dimensions.0.name=ip
&dimensions.1.name=diskname
&dimensions.0.value=172.31.58.160
&dimensions.1.value=sda
&period=300
&statistics=max

Output

{
    "code": 0,
    "message": "",
    "data": {
        "diskname=sda&ip=172.31.58.160": {
            "value": 0.8,
            "updateTime": "2016-06-21 22:40:00"
        }
    }
}

Note: If the queried object exists, "data" field in the returned result is null.
In the returned result, 0.8 is the maximum value analyzed within the time period from 22:35 to 22:40.