Alert Format
Alerts received and sent by Alerta conform to a common alert format. All components of alerta use this message format and any external systems must produce or consume messages in this format also.
Attributes
The following alert attributes are populated at source:
Attribute |
Description |
---|---|
|
resource under alarm, deliberately not host-centric |
|
event name eg. |
|
effected environment, used to namespace the resource |
|
severity of alert (default |
|
list of related event names |
|
status of alert (default |
|
list of effected services |
|
event group used to group events of similar type |
|
event value eg. |
|
freeform text description |
|
set of tags in any format eg. |
|
dictionary of key-value pairs |
|
name of monitoring component that generated the alert |
|
alert type eg. snmptrapAlert, syslogAlert, gangliaAlert |
|
UTC date-time the alert was generated in ISO8601 format |
|
number of seconds before alert is considered stale |
|
unprocessed data eg. full syslog message or SNMP trap |
Note
Only event
and resource
are mandatory.
Attention
If the reject
plugin is enabled (which it is by
default) then alerts must have an environment
attribute that
is one of either Production
or Development
and it must
define a service
attribute. For more information on configuring
or disabling this plugin see plugin config.
Attributes added when processing alerts
Attribute |
Description |
---|---|
|
globally unique random UUID |
|
assigned based on the owner of the API key used
when submitting the alert, if “Customer Views”
is enabled, or can be set if |
|
a count of the number of times this event has been received for a resource |
|
if duplicateCount is 0 or the alert status has changed then repeat is False, otherwise it is True |
|
the previous severity of the same event for this
resource. if no event or |
|
based on |
|
UTC datetime the alert was received by the Alerta server daemon |
|
the last alert |
|
the last time this alert was received. only different to receiveTime if the alert is a duplicate |
|
the last time the alert status changed. used to calculate time remaining until an alert times out |
|
whenever an alert changes severity or status then a list of key alert attributes are appended to the history log |
Alert Status
Status |
Status Code |
---|---|
|
1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
9 |
Alert Severities
The Alarms in Syslog RFC 5674 was referenced when defining alert severities.
Severity |
Severity Code |
Colour |
---|---|---|
|
0 |
Black |
|
1 |
Red |
|
2 |
Orange |
|
3 |
Yellow |
|
4 |
Blue |
|
5 |
Green |
|
6 |
Purple |
|
7 |
Grey |
|
8 |
Silver |
|
9 |
Green |
|
9 |
Green |
|
9 |
Green |
|
10 |
Grey |
History Entries
History log entries can be for either severity or status changes.
Attribute |
Description |
---|---|
|
alert id that history log entry relates to |
|
event name of alert changing severity or status |
|
new severity of alert changing severity |
|
new status of alert changing status |
|
event value of alert changing severity |
|
text describing reason for severity or status change |
|
history type eg. |
|
UTC date-time the alert triggering the change was created |
Note
The severity
and value
attributes are only added to
the history log for alerts with event
changes (See *
above).
And the status
attribute is only added to the history log for
alerts with status
changes (See +
above).
Example
{
"attributes": {
"flapping": false,
"ip": "127.0.0.1",
"notify": true,
"region": "EU"
},
"correlate": [
"HttpServerError",
"HttpServerOK"
],
"createTime": "2018-01-27T21:00:12.999Z",
"customer": null,
"duplicateCount": 0,
"environment": "Production",
"event": "HttpServerError",
"group": "Web",
"history": [
{
"event": "HttpServerError",
"href": "http://localhost:8080/alert/17d8e7ea-b3ba-4bb1-9c5a-29e60865f258",
"id": "17d8e7ea-b3ba-4bb1-9c5a-29e60865f258",
"severity": "major",
"status": null,
"text": "Site is down.",
"type": "severity",
"updateTime": "2018-01-27T21:00:12.999Z",
"value": "Bad Gateway (501)"
}
],
"href": "http://localhost:8080/alert/17d8e7ea-b3ba-4bb1-9c5a-29e60865f258",
"id": "17d8e7ea-b3ba-4bb1-9c5a-29e60865f258",
"lastReceiveId": "17d8e7ea-b3ba-4bb1-9c5a-29e60865f258",
"lastReceiveTime": "2018-01-27T21:00:13.070Z",
"origin": "curl",
"previousSeverity": "indeterminate",
"rawData": null,
"receiveTime": "2018-01-27T21:00:13.070Z",
"repeat": false,
"resource": "web01",
"service": [
"example.com"
],
"severity": "major",
"status": "open",
"tags": [
"dc1"
],
"text": "Site is down.",
"timeout": 86400,
"trendIndication": "moreSevere",
"type": "exceptionAlert",
"value": "Bad Gateway (501)"
}