Skip to content

Commit

Permalink
Add OpsGenie example
Browse files Browse the repository at this point in the history
Useful in particular for how to add HTTP headers.
  • Loading branch information
trickv authored Oct 29, 2021
1 parent 23e3b33 commit d1761bb
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions docs/report-http.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

0 comments on commit d1761bb

Please sign in to comment.