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

FieldTypeRequiredDescription
ModulestringYesValue fixed at "monitor"
PageNumberintegerNoPage number starting from 1. Default value: 1
PageSizeintegerNoNumber of entries per page. Value range: 1–100. Default value: 20
OrderstringNoSort by the first occurrence time in descending order by default. Valid values: ASC (ascending), DESC (descending)
StartTimeintegerNoStart 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`.
EndTimeintegerNoEnd 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`.
MonitorTypesstring[]NoFilter 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.
AlarmObjectstringNoFilter by alarm object. Fuzzy search with string is supported
AlarmStatusstring[]NoFilter 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
ProjectIdsstring[]NoFilter by project ID. Valid values: `-1` (no project), `0` (default project)
InstanceGroupIdsstring[]NoFilter by instance group ID
NamespacesMonitorTypeNamespace[]NoFilter 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"}]`
MetricNamesstring[]NoFilter by metric name
PolicyNamestringNoFuzzy search by policy name
ContentstringNoFuzzy search by alarm content
ReceiverUidsstring[]NoSearch by recipient
ReceiverGroupsstring[]NoSearch by recipient group
PolicyIdsstring[]NoSearch 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.

FieldTypeDescription
TotalCountintegerTotal number
HistoriesAlarmHistory[]Alarm record list
RequestIdstringThe 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
}