monitor — Cloud Monitor
monitor · 2018-07-24
DescribeAlarmHistories
POST
Query the alarm records.
Wire call
Converge Cloud is RPC over HTTP. There is one path — / — and the action travels in the X-TC-Action header. The /monitor/DescribeAlarmHistories 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: DescribeAlarmHistories' \
-H 'X-TC-Version: 2018-07-24' \
-H 'X-TC-Timestamp: <unix-seconds>' \
-H 'X-TC-Region: luzon' \
-d '{"Module":"<Module>"}'Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
| Module | string | Yes | Value fixed at "monitor" |
| PageNumber | integer | No | Page number starting from 1. Default value: 1 |
| PageSize | integer | No | Number of entries per page. Value range: 1–100. Default value: 20 |
| Order | string | No | Sort by the first occurrence time in descending order by default. Valid values: ASC (ascending), DESC (descending) |
| StartTime | integer | No | Start time, which is the timestamp one day ago by default and the time when the alarm `FirstOccurTime` first occurs. An alarm record can be searched only if its `FirstOccurTime` is later than the `StartTime`. |
| EndTime | integer | No | End time, which is the current timestamp and the time when the alarm `FirstOccurTime` first occurs. An alarm record can be searched only if its `FirstOccurTime` is earlier than the `EndTime`. |
| MonitorTypes | string[] | No | Filter by monitor type. Valid values: "MT_QCE" (Converge Cloud service monitoring), "MT_TAW" (application performance monitoring), "MT_RUM" (frontend performance monitoring), "MT_PROBE" (cloud automated testing). If this parameter is left empty, all types will be queried by default. |
| AlarmObject | string | No | Filter by alarm object. Fuzzy search with string is supported |
| AlarmStatus | string[] | No | Filter by alarm status. Valid values: ALARM (not resolved), OK (resolved), NO_CONF (expired), NO_DATA (insufficient data). If this parameter is left empty, all will be queried by default |
| ProjectIds | string[] | No | Filter by project ID. Valid values: `-1` (no project), `0` (default project) |
| InstanceGroupIds | string[] | No | Filter by instance group ID |
| Namespaces | MonitorTypeNamespace[] | No | Filter by policy type. Monitoring type and policy type are first-level and second-level filters respectively and both need to be passed in. For example, `[{"MonitorType": "MT_QCE", "Namespace": "cvm_device"}]` |
| MetricNames | string[] | No | Filter by metric name |
| PolicyName | string | No | Fuzzy search by policy name |
| Content | string | No | Fuzzy search by alarm content |
| ReceiverUids | string[] | No | Search by recipient |
| ReceiverGroups | string[] | No | Search by recipient group |
| PolicyIds | string[] | No | Search by alarm policy ID list |
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 |
|---|---|---|
| TotalCount | integer | Total number |
| Histories | AlarmHistory[] | Alarm record list |
| RequestId | string | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
Success
{
"Response": {
"TotalCount": …,
"Histories": …,
"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 · DescribeAlarmHistories
Read-only. Creates nothing.
Recorded example response
{
"Histories": [],
"TotalCount": 0
}