1
0
mirror of https://github.com/nttgin/BGPalerter.git synced 2024-05-19 06:50:08 +00:00

Merge pull request #682 from trickv/main

Add OpsGenie reportHTTP example
This commit is contained in:
Massimo Candela
2021-10-30 16:36:47 +02:00
committed by GitHub

View File

@@ -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
```