Alarm hook templates
Both email hooks and webhooks allow you to use any of the variables below in your templates by surrounding them with $ (that is, $alarm.name$). When more than one value is present (for example, for aggregate alarms), the result is a string of values separated by a newline character (\n). To see some example templates using variables, refer to Examples.
Alarm properties
Property |
Description |
---|---|
alarm.aggregate |
True if the alarm is an aggregate sensor alarm. |
alarm.condition |
A string representation of the condition that will ring the alarm. |
alarm.consecutive_periods |
The number of consecutive periods required to ring an alarm. |
alarm.date_fired |
The date and time the alarm rang. |
alarm.date_resolved |
The date and time the alarm got resolved. |
alarm.disabled |
True if the alarm is disabled. |
alarm.disabled_until |
The date and time when the alarm will be re-enabled. |
alarm.edit_url |
The URL to the alarm's edit page. |
alarm.element |
The element (login time, latency, error, and so on) that the alarm is set to watch. |
alarm.email_recipients |
The email recipients for the alarm. |
alarm.enabled |
True if the alarm is enabled. |
alarm.name |
The name of the alarm. |
alarm.notes |
The user notes saved for the alarm. |
alarm.period |
The alarm period. |
alarm.state |
The state of the alarm (either ALARM or OK). |
alarm.threshold_operator |
The operator used to compare the current data packet to the alarm threshold (that is, <, >, ==, and so on). |
alarm.threshold_value |
The alarm's threshold; the value at which the alarm will ring. |
alarm.url |
The URL for the alarm's details page. |
alarm.alert_id |
The unique id for the ring. It can be used to link resolves to rings. |
Alert group properties
Property |
Description |
---|---|
alarm.alert_group.name |
The name of the alarm's alert group. |
Organization properties
Property |
Description |
---|---|
alarm.organization.name |
The name of the organization that owns the alarm. |
Sensor properties
Property |
Description |
---|---|
alarm.sensors.count |
The count of the total number of sensors that the alarm is applied to. |
alarm.sensors.enabled_count |
The count of sensors that are enabled for this alarm. |
alarm.sensors.percent_affected |
The percent of sensors that are in alert state for this alarm. |
alarm.sensors.affected_count |
The count of sensors that are in alert state for this alarm. |
alarm.sensors.affected_ids |
The id of each sensor in alert state that the alarm is applied to. |
alarm.sensors.affected_titles |
The title of each sensor in alert state that the alarm is applied to. |
alarm.sensors.affected_types |
The type of each sensor in alert state that the alarm is applied to. |
alarm.sensors.affected_id |
The id of the sensor that caused the alarm to either fire or resolve. |
alarm.sensors.affected_title |
The title of the sensor that caused the alarm to either fire or resolve. |
alarm.sensors.affected_type |
The type of the sensor that caused the alarm to either fire or resolve. |
alarm.sensors.threshold_percent |
The percent of sensors in alert state required to fire an aggregate alarm. |
alarm.sensors.titles |
The title of each sensor that this alarm is applied to. |
alarm.sensors.types |
The type of each sensor that the alarm is applied to. |
alarm.sensors.last_uploads |
The percent of sensors in alert state required to fire an aggregate alarm. |
User properties
Property |
Description |
---|---|
alarm.user.email_address |
The email address of the user that created this alarm. |
Site properties
Property |
Description |
---|---|
alarm.site.display_name |
The display name of the site where the most recent alert has fired from. |
alarm.site.machine_name |
The machine name of the site where the most recent alert has fired from. |
Examples
Example for an aggregate alarm
Affected sensors: $alarm.sensors.percent_affected$
Affected sensor % threshold: $alarm.sensors.threshold_percent$%
Enabled sensors: $alarm.sensors.enabled_count$ of $alarm.sensors.count$
Condition: $alarm.condition$
Timestamp: $alarm.date_fired$
State: $alarm.state$
URL: $alarm.url$
Edit URL: $alarm.edit_url$
Analysis:
Resolving alarm: $alarm.sensors.percent_affected$ ($alarm.sensors.affected_count$ of $alarm.sensors.count$) sensors are in the alarm state, which is below the configured threshold of $alarm.sensors.threshold_percent$%.
Sensors Still In Alarm State:
$alarm.sensors.affected_titles$
Example for a per-sensor alarm
Sensor: $alarm.sensors.affected_titles$
Condition: $alarm.condition$
Timestamp: $alarm.date_fired$
State: $alarm.state$
URL: $alarm.url$
Edit URL: $alarm.edit_url$
Analysis:
CloudReady Monitor Alarm "$alarm.name$" for sensor "$alarm.sensors.affected_titles$" has entered the $alarm.state$ state for the element $alarm.element$. The sensor uploaded data at: "$alarm.sensor.last_uploads".
Alarm Details:
Name: $alarm.name$
Element: $alarm.element$
Condition: $alarm.condition$
Timestamp: $alarm.date_fired$
Sensor Details:
Title: $alarm.sensors.titles$
Type: $alarm.sensors.types$