The monitoring service keeps a record of notifications sent for each alarm. This history is further subdivided by the check on which the notification occurred. Every attempt to send a notification is recorded, making this history a valuable tool in diagnosing issues with unreceived notifications, in addition to offering a means of viewing the history of an alarm's statuses.
Alarm notification history is accessible as a Time Series Collection. By default alarm notification history is stored for 30 days and the API queries the last 7 days of information.
| Verb | URI | Description | |||||
| GET | /entities/entityId/alarms/alarmId/notification_history |
List checks for which alarm notification history is available. | |||||
Normal Response Code: 200
Error Response Codes: 401, 403, 500, 503
Example 4.74. Alarm Notification History Discovery Response: XML
<?xml version='1.0' encoding='utf-8'?>
<alarm_checks_map>
<check_ids>
<check_id>chOne</check_id>
<check_id>chTwo</check_id>
</check_ids>
</alarm_checks_map>
Example 4.75. Alarm Notification History Discovery Response: JSON
{
"check_ids": [
"chOne",
"chTwo"
]
}
| Verb | URI | Description | |||||
| GET | /entities/entityId/alarms/alarmId/notification_history/checkId |
Lists alarm notification history for a given entity, alarm and check. | |||||
Normal Response Code: 200
Error Response Codes: 401, 403, 500, 503
Example 4.76. Alarm Notification History List Response: XML
<?xml version="1.0" encoding="utf-8"?>
<container>
<values>
<alarm_notification_history_item id="646ac7b0-0b34-11e1-a0a1-0ff89fa2fa26">
<timestamp>1320885544875</timestamp>
<notification_plan_id>npOne</notification_plan_id>
<transaction_id>sometransaction</transaction_id>
<status>matched return statement on line 6</status>
<state>WARNING</state>
<previous_state>OK</previous_state>
<notification_results>
<notification_result>
<notification_id>ntOne</notification_id>
<notification_type>webhook</notification_type>
<notification_details>
<url>http://admin.example.com/notify/</url>
</notification_details>
<in_progress>false</in_progress>
<message>Success: Webhook successfully executed</message>
<success>true</success>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<attempts>
<message>Unexpected status code "404". Expected one of: /2[0-9]{2}/</message>
<from>ele</from>
</attempts>
<attempts>
<message>Success: Webhook successfully executed</message>
<from>ele</from>
</attempts>
</notification_result>
<notification_result>
<notification_id>ntFive</notification_id>
<notification_type>webhook</notification_type>
<notification_details>
<url>https://down.example.com/notify/</url>
</notification_details>
<in_progress>false</in_progress>
<success>false</success>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<message>Notification failed after 10 attempts</message>
</notification_result>
</notification_results>
</alarm_notification_history_item>
</values>
<metadata>
<count>1</count>
<limit>50</limit>
<marker/>
<next_marker/>
<next_href/>
</metadata>
</container>
Example 4.77. Alarm Notification History List Response: JSON
{
"values": [
{
"id": "646ac7b0-0b34-11e1-a0a1-0ff89fa2fa26",
"timestamp": 1320885544875,
"notification_plan_id": "npOne",
"transaction_id": "sometransaction",
"status": "matched return statement on line 6",
"state": "WARNING",
"previous_state": "OK",
"notification_results": [
{
"notification_id": "ntOne",
"notification_type": "webhook",
"notification_details": {
"url": "http://admin.example.com/notify/"
},
"in_progress": false,
"message": "Success: Webhook successfully executed",
"success": true,
"attempts": [
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
},
{
"message": "Unexpected status code \"404\". Expected one of: /2[0-9]{2}/",
"from": "ele"
},
{
"message": "Success: Webhook successfully executed",
"from": "ele"
}
]
},
{
"notification_id": "ntFive",
"notification_type": "webhook",
"notification_details": {
"url": "https://down.example.com/notify/"
},
"in_progress": false,
"success": false,
"attempts": [
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
},
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
},
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
},
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
},
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
},
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
},
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
},
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
},
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
},
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
}
],
"message": "Notification failed after 10 attempts"
}
]
}
],
"metadata": {
"count": 1,
"limit": 50,
"marker": null,
"next_marker": null,
"next_href": null
}
}
| Verb | URI | Description | |||||
| GET | /entities/entityId/alarms/alarmId/notification_history/checkId/uuid |
Retrieve a single alarm notification history item. | |||||
Normal Response Code: 200
Error Response Codes: 401, 403, 500, 503
Example 4.78. Get Alarm Notification History Response: XML
<?xml version="1.0" encoding="utf-8"?>
<alarm_notification_history_item id="646ac7b0-0b34-11e1-a0a1-0ff89fa2fa26">
<timestamp>1320885544875</timestamp>
<notification_plan_id>npOne</notification_plan_id>
<transaction_id>sometransaction</transaction_id>
<status>matched return statement on line 6</status>
<state>WARNING</state>
<previous_state>OK</previous_state>
<notification_results>
<notification_result>
<notification_id>ntOne</notification_id>
<notification_type>webhook</notification_type>
<notification_details>
<url>http://admin.example.com/notify/</url>
</notification_details>
<in_progress>false</in_progress>
<message>Success: Webhook successfully executed</message>
<success>true</success>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<attempts>
<message>Unexpected status code "404". Expected one of: /2[0-9]{2}/</message>
<from>ele</from>
</attempts>
<attempts>
<message>Success: Webhook successfully executed</message>
<from>ele</from>
</attempts>
</notification_result>
<notification_result>
<notification_id>ntFive</notification_id>
<notification_type>webhook</notification_type>
<notification_details>
<url>https://down.example.com/notify/</url>
</notification_details>
<in_progress>false</in_progress>
<success>false</success>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<attempts>
<message>ECONNREFUSED, Connection refused</message>
<from>ele</from>
</attempts>
<message>Notification failed after 10 attempts</message>
</notification_result>
</notification_results>
</alarm_notification_history_item>
Example 4.79. Get Alarm Notification History Response: JSON
{
"id": "646ac7b0-0b34-11e1-a0a1-0ff89fa2fa26",
"timestamp": 1320885544875,
"notification_plan_id": "npOne",
"transaction_id": "sometransaction",
"status": "matched return statement on line 6",
"state": "WARNING",
"previous_state": "OK",
"notification_results": [
{
"notification_id": "ntOne",
"notification_type": "webhook",
"notification_details": {
"url": "http://admin.example.com/notify/"
},
"in_progress": false,
"message": "Success: Webhook successfully executed",
"success": true,
"attempts": [
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
},
{
"message": "Unexpected status code \"404\". Expected one of: /2[0-9]{2}/",
"from": "ele"
},
{
"message": "Success: Webhook successfully executed",
"from": "ele"
}
]
},
{
"notification_id": "ntFive",
"notification_type": "webhook",
"notification_details": {
"url": "https://down.example.com/notify/"
},
"in_progress": false,
"success": false,
"attempts": [
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
},
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
},
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
},
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
},
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
},
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
},
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
},
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
},
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
},
{
"message": "ECONNREFUSED, Connection refused",
"from": "ele"
}
],
"message": "Notification failed after 10 attempts"
}
]
}

