AlertmanagerIntegration is script that will parse webhook notifications coming to Rocket.Chat.
-
Login as admin user and go to: Administration => Integrations => New Integration => Incoming WebHook
-
Set "Enabled" and "Script Enabled" to "True"
-
Set all channel, icons, etc. as you need
-
Paste contents of AlertmanagerIntegrations.js into Script field.
-
Create Integration. You;ll see some values apper. Copy WebHook URL and proceed to Alertmanager.
- 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}'
- Reload/restart alertmanager.
If everything is OK you should see alerts like this:
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.