View an alarm's history
See every state change of an alarm, why it happened, and what was sent to its recipients.
Replace alarm-id with the alarm's id.
Prerequisites
- Permission for
monitoring:DescribeAlarmHistoryon the alarm,rn:ews::<organization id>:monitoring:alarm/<alarm id>. Without it, the API answers404"Alarm not found" and the console's History is unavailable, with the note "Needs monitoring:DescribeAlarmHistory on this alarm." - In the console, also
monitoring:DescribeAlarmsto open Alarms.
Read the history
- Open Monitoring, then Alarms.
- Open the alarm's action menu and choose History.
Each entry shows the state before and after, when, the reason, and what was sent. An alarm that has not changed state yet says "No state changes yet. The alarm is evaluated every minute."
To see the current state and its reason without the history, choose the alarm's row: the side panel shows State, Why, Condition and Notifies.
dcloud monitoring alarms history alarm-id --limit 20GET /monitoring/api/alarms/alarm-id/history?limit=20Result
Up to limit state changes (100 by default, at most 500), newest first. Each has fromState,
toState, reason and notification: what was sent, for example "emailed 2; webhook 204",
"webhook failed: HTTP 500", "No recipients configured." or "Notifications are switched off for
this alarm.". A change between OK and INSUFFICIENT_DATA sends nothing and has no notification.
The history is deleted with the alarm.