Skip to content

Commit

Permalink
Merge pull request #1026 from PacketVis/jira-integration
Browse files Browse the repository at this point in the history
Jira integration
  • Loading branch information
massimocandela authored Jan 31, 2023
2 parents 2a38003 + 309fb7f commit 5ddadcb
Showing 1 changed file with 77 additions and 31 deletions.
108 changes: 77 additions & 31 deletions docs/report-http.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
BGPalerter can send alerts by means of POST requests to a provided URL.
This can be done by configuring the module reportHTTP. Read [here](configuration.md#reporthttp) to understand how.

For configuring reportHTTP, essentially you need to specify two things:
For configuring reportHTTP, essentially you need to specify two things:
* The URL
* A template of the POST request.

Expand Down Expand Up @@ -70,22 +70,23 @@ Thanks to [@fstolba](https://github.com/nttgin/BGPalerter/issues/81).
Pushover is an app that makes it easy to get real-time notifications on your Android, iPhone, iPad, and Desktop.

```yaml
- file: reportHTTP
channels:
- hijack
- newprefix
- visibility
- path
- misconfiguration
- rpki
params:
templates:
default: '{"message": "${channel}: ${summary}", "title": "BGPalerter", "priority": "1", "token": "_YOUR_API_TOKEN_HERE_", "user": "_YOUR_USER_KEY_HERE_"}'
headers:
isTemplateJSON: true
showPaths: 0
hooks:
default: https://api.pushover.net/1/messages.json
reports:
- file: reportHTTP
channels:
- hijack
- newprefix
- visibility
- path
- misconfiguration
- rpki
params:
templates:
default: '{"message": "${channel}: ${summary}", "title": "BGPalerter", "priority": "1", "token": "_YOUR_API_TOKEN_HERE_", "user": "_YOUR_USER_KEY_HERE_"}'
headers:
isTemplateJSON: true
showPaths: 0
hooks:
default: https://api.pushover.net/1/messages.json
```

Thanks to [Hugo Salgado](https://twitter.com/huguei/status/1278771420525408258).
Expand Down Expand Up @@ -188,24 +189,69 @@ reports:
[RocketChat](https://rocket.chat/) is an open source messaging platform.

```yaml
- file: reportHTTP
channels:
reports:
- file: reportHTTP
channels:
- hijack
- newprefix
- visibility
- path
- misconfiguration
- rpki
params:
templates:
default: '{"username": "BGPalerter", "channel": "_CHANNEL_NAME_", "text": "${channel}: ${summary}"}'
headers:
isTemplateJSON: true
showPaths: 0
hooks:
default: https://_RC_URL/hooks/_YOUR_KEY_
```

> Configure the "_CHANNEL_NAME_" in the template. Start with @ for user or # for channel. Eg: @john or #general

Thanks to [cadirol](https://github.com/nttgin/BGPalerter/pull/704).


## Jira

[Jira](https://www.atlassian.com/software/jira) is a project management tool developed by Atlassian.

To make this integration work, you need:
* A project id ([how to get one](https://confluence.atlassian.com/jirakb/how-to-get-project-id-from-the-jira-user-interface-827341414.html))
* An issue type ([how to get one](https://confluence.atlassian.com/jirakb/finding-the-id-for-issue-types-646186508.html))
* A valid token ([how to create one](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/))
* A V2 REST API endpoint (e.g., https://_ACCOUNT_NAME_.atlassian.net/rest/api/2/issue/)

```yaml
reports:
- file: reportHTTP
channels:
- hijack
- newprefix
- visibility
- path
- misconfiguration
- rpki
params:
templates:
default: '{"username": "BGPalerter", "channel": "_CHANNEL_NAME_", "text": "${channel}: ${summary}"}'
headers:
isTemplateJSON: true
showPaths: 0
hooks:
default: https://_RC_URL/hooks/_YOUR_KEY_
params:
templates:
default: '{
"fields": {
"project": {
"id": "_YOUR_PROJECT_ID_"
},
"summary": "BGPalerter - event: ${type}",
"description": "${summary} \nEarliest: ${earliest} \nLatest: ${latest}",
"issuetype": {
"id": "_YOUR_ISSUETYPE_ID_"
}
}
}'
isTemplateJSON: true
headers:
'Content-Type': 'application/json'
'Authorization': 'Basic BASE64(_USER_EMAIL_:_TOKEN_)'
showPaths: 0
hooks:
default: _API_URL_
```

> Configure the "_CHANNEL_NAME_" in the template. Start with @ for user or # for channel. Eg: @john or #general

Thanks to [cadirol](https://github.com/nttgin/BGPalerter/pull/704).

0 comments on commit 5ddadcb

Please sign in to comment.