monitor — Cloud Monitor
monitor · 2018-07-24
GetMonitorData
POST
Get the monitoring data of cloud services other than TKE. To pull TKE monitoring data, use DescribeStatisticData.
Wire call
Converge Cloud is RPC over HTTP. There is one path — / — and the action travels in the X-TC-Action header. The /monitor/GetMonitorData path used in the OpenAPI document is a documentation convenience so each action is addressable; it is not a route on the server.
curl
curl -sS https://monitor.api3.convergecloud.com/ \
-H 'Authorization: TC3-HMAC-SHA256 Credential=<SecretId>/<YYYY-MM-DD>/monitor/tc3_request, SignedHeaders=content-type;host;x-tc-action, Signature=<sig>' \
-H 'Content-Type: application/json; charset=utf-8' \
-H 'Host: monitor.api3.convergecloud.com' \
-H 'X-TC-Action: GetMonitorData' \
-H 'X-TC-Version: 2018-07-24' \
-H 'X-TC-Timestamp: <unix-seconds>' \
-H 'X-TC-Region: luzon' \
-d '{"Namespace":"<Namespace>","MetricName":"<MetricName>","Instances":"<Instances>"}'Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
| Namespace | string | Yes | Namespace, such as QCE/CVM. For more information on the namespaces of each Converge Cloud service, please see Converge Cloud Service Metrics |
| MetricName | string | Yes | Metric name, such as `CPUUsage`. Only one monitoring metric can be pulled at a time. For more information on the metrics of each Converge Cloud service, please see Converge Cloud Service Metrics. The corresponding metric name is `MetricName`. |
| Instances | Instance[] | Yes | The dimension combination for instance objects, which is in the form of a set of key-value pairs. The dimension fields for instances of different Converge Cloud services are completely different. For example, the field is [{"Name":"InstanceId","Value":"ins-j0hk02zo"}] for CVM instances, [{"Name":"instanceId","Value":"ckafka-l49k54dd"}] for CKafka instances, and [{"Name":"appid","Value":"1258344… |
| Period | integer | No | Monitoring statistical period in seconds, such as 60. Default value: 300. The statistical period varies by metric. For more information on the statistical periods supported by each Converge Cloud service, please see Converge Cloud Service Metrics. The values in the statistical period column are the supported statistical periods. A single request can get up to 1,440 data points. |
| StartTime | string | No | Start time such as 2018-09-22T19:51:23+08:00 |
| EndTime | string | No | End time, which is the current time by default, such as 2018-09-22T20:51:23+08:00. `EndTime` cannot be earlier than `StartTime` |
Response
Fields are returned inside the Response envelope. Converge Cloud answers HTTP 200 for errors as well as successes, so read Response.Error rather than the status code — and test for the presence of that object, because Code is occasionally the empty string.
| Field | Type | Description |
|---|---|---|
| Period | integer | Statistical period |
| MetricName | string | Metric name |
| DataPoints | DataPoint[] | Array of data points |
| StartTime | string | Start time |
| EndTime | string | End time |
| Msg | string | Returned message |
| RequestId | string | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
Success
{
"Response": {
"Period": …,
"MetricName": …,
"RequestId": "…"
}
}Error
{
"Response": {
"Error": { "Code": "…", "Message": "…" },
"RequestId": "…"
}
}Try it
CredentialThe key never leaves this tab — it signs the request here. The signed request goes to /api-relay/monitor.
Request bodyvalid JSONPOST monitor.api3.convergecloud.com · GetMonitorData
Read-only. Creates nothing.
