Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Mattermost reporter #81

Closed
fstolba opened this issue Nov 28, 2019 · 7 comments
Closed

Feature request: Mattermost reporter #81

fstolba opened this issue Nov 28, 2019 · 7 comments
Labels
enhancement New feature or request next release Implemented but will be released with the next release no-stale Important issue which needs community help

Comments

@fstolba
Copy link

fstolba commented Nov 28, 2019

Mattermost is a popular open-source, self-hosting capable alternative to Slack. It would be highly appreciated if you could look into creating a reporter for that platform.

If you decide to implement it I would definitely be willing to test and provide feedback.

@massimocandela massimocandela added the enhancement New feature or request label Dec 6, 2019
@stale stale bot added the wontfix This will not be worked on label Mar 5, 2020
@stale
Copy link

stale bot commented Mar 6, 2020

This issue has been automatically closed as stale. This mechanism helps to prioritize feature requests which received more support from the community. If you want to open again this issue you have to provide a Pull Request.

@stale stale bot closed this as completed Mar 6, 2020
@massimocandela massimocandela added help wanted Extra attention is needed no-stale Important issue which needs community help and removed wontfix This will not be worked on labels Mar 6, 2020
@massimocandela massimocandela reopened this Mar 6, 2020
@massimocandela
Copy link
Member

Hello,

The Mattermost integration is now available with the reportHTTP module. This is currently deployed in dev. Please, provide me with feedback. In particular we could describe a specific set of templates for mattermost.

@massimocandela massimocandela added next release Implemented but will be released with the next release and removed help wanted Extra attention is needed labels Apr 14, 2020
@fstolba
Copy link
Author

fstolba commented Apr 14, 2020

Hi Massimo,
great, having a general webhook mechanism is certainly the most flexible approach. I will give it a try and report back.

@fstolba
Copy link
Author

fstolba commented May 5, 2020

So I finally came around to testing the reporter module and as far as I tested it works flawlessly.

The config we're using it with:

# Report to Mattermost channel
reports:
  - file: reportHTTP
    channels:
      - hijack
      - newprefix
      - visibility
      - path
      - misconfiguration
    params:
      templates:
        default: '
  {"attachments": [
  {"fields": [ {"title": "Prefix:", "value": "${prefix}", "short": "false"},
  {"title": "Expected from:", "value": "AS ${asn}", "short": "true"},
  {"title": "Seen from:", "value": "AS ${neworigin}", "short": "true"},
  {"title": "Since:", "value": "${earliest}", "short": "true"},
  {"title": "Details:", "value": "[BGPlay](${bgplay})", "short": "true"},
  {"title": "Event description":, "value": "${summary}"} ], 
  "text": "#bgpalerter #${type}", "color": "#ffffff"}]}'
        visibility: '
  {"attachments": [
  {"fields": [ {"title": "Prefix:", "value": "${prefix}", "short": "false"},
  {"title": "Originating from:", "value": "AS ${asn}", "short": "true"},
  {"title": "Since:", "value": "${earliest}", "short": "true"},
  {"title": "Details:", "value": "[BGPlay](${bgplay})", "short": "true"},
  {"title": "Event description", "value": "${summary}"} ], 
  "text": "#bgpalerter #${type}", "color": "#ffffff"}]}'
      isTemplateJSON: true
      headers:
      showPaths: 0 # Amount of AS_PATHs to report in the alert
      hooks:
        default: WEBHOOK_URL

which results in messages like these

grafik

Adding additional properties or modifying field descriptions can be easily done by adapting the fields array.

@massimocandela
Copy link
Member

Hi @fstolba,

This is great!
I'm going to create a documentation page dedicated to mattermost and provide the template you wrote.

Ciao,
Massimo

@fstolba
Copy link
Author

fstolba commented May 7, 2020

Glad I could be of help. Thanks again @massimocandela for implementing this feature, it helps integrate BGPalerter much more seamlessly with our other tools.

@fstolba fstolba closed this as completed May 7, 2020
@massimocandela
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request next release Implemented but will be released with the next release no-stale Important issue which needs community help
Projects
None yet
Development

No branches or pull requests

2 participants