Alarm notification history

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. When accessing a time series collection, two parameters beyond the base paginated collection API are available: from and to. For details, see Time Series Collection.

By default alarm notification history is stored for 30 days and the API queries the last 7 days of information.

Use the following alarms notification history API operations to view the notification history for alarms and checks.

List alarm notification history

GET /entities/{entityId}/alarms/{alarmId}/notification_history

Lists alarm notification history for a given alarm.

The following table shows the possible response codes for this operation:

Response CodeNameDescription
200OKRequest completed.
401UnauthorizedThe system received a request from a user that is not authenticated.
403ForbiddenThe system received a request that the user is not authorized to make.
500Internal Server ErrorAn unexpected condition was encountered.
503Service UnavailableThe system is experiencing heavy load or another system failure.

Request

The following table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenString (Required)A valid authentication token with administrative access. For details, see Get your credentials

Note

This operation does not accept a request body.

Response

Example List alarm notification history: JSON response

{
"check_ids": [
"chOne",
"chTwo"
]
}

List alarm notification history by check ID

GET /entities/{entityId}/alarms/{alarmId}/notification_history/{checkId}

Lists alarm notification history for a given alarm and check.

This operation can be paginated. For information, see Paginated collections .

The following table shows the possible response codes for this operation:

Response CodeNameDescription
200OKThe request completed.
401UnauthorizedThe system received a request from a user that is not authenticated.
403ForbiddenThe system received a request that the user is not authorized to make.
500Internal Server ErrorAn unexpected condition was encountered.
503Service UnavailableThe system is experiencing heavy load or another system failure.

Request

The following table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenString (Required)A valid authentication token with administrative access. For details, see Get your credentials

Note

This operation does not accept a request body.

Response

Example List alarm notification history by check ID: JSON response

{
"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
}
}

List a single alarm notification

GET /entities/{entityId}/alarms/{alarmId}/notification_history/{checkId}/{uuid}

Lists an alarm notification by UUID.

The following table shows the possible response codes for this operation:

Response CodeNameDescription
200OKThe request completed.
401UnauthorizedThe system received a request from a user that is not authenticated.
403ForbiddenThe system received a request that the user is not authorized to make.
500Internal Server ErrorAn unexpected condition was encountered.
503Service UnavailableThe system is experiencing heavy load or another system failure.

Request

The following table shows the header parameters for the request:

NameTypeDescription
X-Auth-TokenString (Required)A valid authentication token with administrative access. For details, see Get your credentials

Note

This operation does not accept a request body.

Response

Example List a single alarm notification: JSON response

{
"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"
}
]
}