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

FieldTypeRequiredDescription
NamespacestringYesNamespace, such as QCE/CVM. For more information on the namespaces of each Converge Cloud service, please see Converge Cloud Service Metrics
MetricNamestringYesMetric 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`.
InstancesInstance[]YesThe 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…
PeriodintegerNoMonitoring 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.
StartTimestringNoStart time such as 2018-09-22T19:51:23+08:00
EndTimestringNoEnd 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.

FieldTypeDescription
PeriodintegerStatistical period
MetricNamestringMetric name
DataPointsDataPoint[]Array of data points
StartTimestringStart time
EndTimestringEnd time
MsgstringReturned message
RequestIdstringThe 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.