From e94318769a70f07d01cb5241de9fb9bd67db3329 Mon Sep 17 00:00:00 2001 From: Moritz Frenzel Date: Mon, 10 Oct 2022 16:35:31 +0200 Subject: [PATCH 1/2] Adding Jira HTTP Report documentation --- docs/report-http.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/docs/report-http.md b/docs/report-http.md index 8ba57803..934e232e 100644 --- a/docs/report-http.md +++ b/docs/report-http.md @@ -209,3 +209,46 @@ reports: > 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 is a project management tool by Atlassian. + +You need to set the project key and the issuetype ID according to your environment. +To obtain the issuetype ID: +```bash +curl 'https://user:token@domain.atlassian.net/rest/api/latest/issue/SUP-123' | jq .fields.issuetype.id +``` + +If your username includes the `@`-character replace it with `%40`. + +```yaml +- file: reportHTTP + channels: + - hijack + - newprefix + - visibility + - path + - misconfiguration + - rpki + params: + templates: + default: '{ + "fields": { + "project": + { + "key": "SUP" + }, + "summary": "BGPAlerter: ${type}: ${prefix}", + "description": "Prefix: ${prefix}\nEvent Type: ${type}\nEarliest: ${eraliest}\nLatest: ${latest}\nASN: ${asn}\nBGPlay: ${bgplay}\n", + "issuetype": { + "id": "10223" + } + } + }' + isTemplateJSON: true + headers: + showPaths: 0 # Amount of AS_PATHs to report in the alert + hooks: + default: 'https://user%domain.com:@company.atlassian.net/rest/api/2/issue' +``` From 7c6c85aa0df69089b996e936ecf35aed32ad933c Mon Sep 17 00:00:00 2001 From: Moritz Frenzel Date: Fri, 14 Oct 2022 16:31:42 +0200 Subject: [PATCH 2/2] fix typo --- docs/report-http.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/report-http.md b/docs/report-http.md index 934e232e..0b37c8c7 100644 --- a/docs/report-http.md +++ b/docs/report-http.md @@ -240,7 +240,7 @@ If your username includes the `@`-character replace it with `%40`. "key": "SUP" }, "summary": "BGPAlerter: ${type}: ${prefix}", - "description": "Prefix: ${prefix}\nEvent Type: ${type}\nEarliest: ${eraliest}\nLatest: ${latest}\nASN: ${asn}\nBGPlay: ${bgplay}\n", + "description": "Prefix: ${prefix}\nEvent Type: ${type}\nEarliest: ${earliest}\nLatest: ${latest}\nASN: ${asn}\nBGPlay: ${bgplay}\n", "issuetype": { "id": "10223" }