Skip to content

Instantly share code, notes, and snippets.

@bretton
Created January 6, 2026 16:01
Show Gist options
  • Select an option

  • Save bretton/89476d558567f3b5a6c1c1411132f9be to your computer and use it in GitHub Desktop.

Select an option

Save bretton/89476d558567f3b5a6c1c1411132f9be to your computer and use it in GitHub Desktop.
Sending BGPAlerter alerts to discord

If you're using https://github.com/nttgin/BGPalerter and want to send alerts to a discord channel, which isn't listed in the documentation at https://github.com/nttgin/BGPalerter/blob/main/docs/report-http.md you can enable it as follows:

In volume/config.yml the default reporting section on setup contains:

reports:
  - file: reportFile
    channels:
      - hijack
      - newprefix
      - visibility
      - path
      - misconfiguration
      - rpki

You can expand it to match the following, setting an appropriate username and discord webhook URL as follows:

reports:
  - file: reportFile
    channels:
      - hijack
      - newprefix
      - visibility
      - path
      - misconfiguration
      - rpki
  - file: reportHTTP
    channels:
      - hijack
      - newprefix
      - visibility
      - path
      - misconfiguration
      - rpki
    params:
      isTemplateJSON: true
      showPaths: 0
      templates:
        default: '{"username":"<USEFUL NAME>","content":"${channel}: ${summary}"}'
      headers:
        Content-Type: application/json
      hooks:
        default: "https://discord.com/api/webhooks/<webhook_id>/<webhook_token>"

But first make sure you've created a channel, and enabled the webhook for that channel!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment