diff --git a/docs/report-http.md b/docs/report-http.md index 1b6f77ca..46cddaf8 100644 --- a/docs/report-http.md +++ b/docs/report-http.md @@ -138,3 +138,45 @@ reports: ``` Thanks [arpanet-creeper](https://github.com/nttgin/BGPalerter/pull/412) for the help. + +## OpsGenie + +OpsGenie is an alert management tool by Atlassian. It's also a good example of how to use HTTP headers with reportHTTP. + +```yaml +reports: + - file: reportHTTP + channels: + - hijack + - newprefix + - visibility + - path + - misconfiguration + - rpki + params: + templates: + default: ' + { + "message": "BGPalerter ${channel} ${description}", + "description": "${summary}", + "details": + { + "prefix": "${prefix}", + "bgplay": "${bgplay}", + "earliest": "${earliest}", + "latest": "${latest}", + "channel": "${channel}", + "type": "${type}", + "asn": "${asn}", + "paths": "${paths}", + "peers": "${peers}" + } + }' + headers: + 'Content-Type': 'application/json' + 'Authorization': 'GenieKey 00000000-1111-2222-3333-444444444444' + isTemplateJSON: true + showPaths: 5 + hooks: + default: https://api.opsgenie.com/v2/alerts +```