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:
@@ -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
|
||||
```
|
||||
|
Reference in New Issue
Block a user