diegodorgam / AlertmanagerRocketChat

Integration of Alertmanager notifications in RocketChat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AlertmanagerRocketChar

Overview

AlertmanagerIntegration is script that will parse webhook notifications coming to Rocket.Chat.

Installation

Rocket.Chat

  1. Login as admin user and go to: Administration => Integrations => New Integration => Incoming WebHook

  2. Set "Enabled" and "Script Enabled" to "True"

  3. Set all channel, icons, etc. as you need

  4. Paste contents of AlertmanagerIntegrations.js into Script field.

  5. Create Integration. You;ll see some values apper. Copy WebHook URL and proceed to Alertmanager.

Alertmanager

  1. Create new receiver or modify config of existing one. You'll need to add webhooks_config to it. Small example:
route:
    repeat_interval: 30m
    group_interval: 30m
    receiver: 'rocketchat'

receivers:
    - name: 'rocketchat'
      webhook_configs:
          - send_resolved: false
            url: '${WEBHOOK_URL}'
  1. Reload/restart alertmanager.

If everything is OK you should see alerts like this:

alert example

NOTES

Alertmanager doesn't actually sends singular alerts - it sends array of current alerts, so it doesn't seem possible for now to split then in separate messages, but if you want, you can configure separate alerts/receivers/webhooks.

Alertmanager Docs

Rocket.Chat Docs

About

Integration of Alertmanager notifications in RocketChat

License:MIT License


Languages

Language:JavaScript 100.0%