An alert to be raised can be propagated to multiple RESTful destinations. Specific encoding of various RESTful destinations, such as authentication and formatting, are handled by respective RESTful plugins for convenience.
To add a new destination, configure a "RestFul variable" using plugin's specific options in GUI. (API-wise, use mergevar call).
To make an alert use a RESTful destination, include its name in an alert's restfulChannel configuration parameter and specify alert formatting string in alert's restfulFmt parameter (API-wise use setalertconfig call).
Plugins that require an alert reference ID pass it in the form <tenantId>#<alertId>#<key.id>, which makes an alert unique for a tenant, alert and key value. Plugins that require a specific severity level adapt the alerting level into their own.
Example API URI and body to create a RESTful variable:
POST https://localhost:4000/api/alertapi/mergevar
{"opsg2":{"value":{"opsgenie.key":"1c30a1bd-8fd7-4f58-8130-a58a49f78af5"},"type":"json","group":"restful:opsgenie"}}
Example API URI and body (snippet) to set restful destination for an alert:
POST https://localhost:4000/api/alertapi/setalertconfig?subconfig=alertconfig
...
"U3B2XAvg": {
"enable": true,
"parameters": {
"restfulFmt": "max PC severity ${alert.severity}",
"severity": 2,
"restfulChannel": "slack#1, opsgenie"
},
"description": "CA src|dst max PC",
"type": "CSTPC"
...
by default all alerts will be archived in Elastic Search
the address of the Elastic Search server is configured statically in environment variables
status: mature
alerts notifications can be submitted via slack
To set it up create a RESTful variable with proper slack authentication token.
status: mature
alerts can be submitted for management to opsgenie.
To set it up, create a RESTful variable with proper GenieKey authentication token.
alert severity is mapped 0->P1 (critical), 1->P2 (high), 2 -> P3 (moderate)
status: mature
alerts can be submitted to a generic HTTPs destination as the last resort, when no RESTful convenience plugin is available.
Configure the following RESTful variable in the form of a stringified JSON object as shown in this example to set it up:
{ "restful.restfulUrl": "http://www.seznam.cz",
"restful.restfulHdr": " { \"Authorization\": \"proprautmethod token\" }",
"restful.restfulAuth": "" }
restfulURL stands for destination URL and may contain JSON-path-plus substitution expressions referring to alert events, restfulHdr lists all HTTP headers, restfulAuth includes a password for basic authentication. All fields must be present, Hdr and Auth may have empty value.
status: mature
alerts can be pushed via Matrix
Configuration parameters:
Matrix room id
Matrix URI
Matrix Token
status: experimental
alerts can be pushed to PagerDuty
Configuration parameters:
Pagerduty Integration Key
status: experimental
alerts can be stored in service-now tracking system
status: outdated, needs an update