wiki:grafana_rocketchat_notifications
This is an old revision of the document!
Table of Contents
Grafana to rocketchat notifications
First set create the Contact point under Alerting and add Rocketchat webhook.
Under Optional webhook settings set:
> HTTP method to post
> Extra headers to Content-Type application/json
then set the Custom payload (click on Edit Payload template > Enter custom payload template) to something RC expects e.g.
- | download
{ "emoji":":panda_face:", "alias": "Grafana alert", "text": "{{ range .Alerts }}*{{ .Status | toUpper }}*: {{ .Labels.compose_project }}\n Server host: {{ .Labels.host }}\nContainer name: {{ .Labels.container_name }}\n{{ end }}", "attachments": [ { "title": "some link to smth", "title_link": "https://rocket.chat", "text": "Rocket.Chat, the best open source chat", "image_url": "https://rocket.chat", "color": "#724AA5" } ] }
.Labels contains the labels assigned under the Alert rules. Change other fields as well.
Tested on
See also
References
wiki/grafana_rocketchat_notifications.1779197272.txt.gz · Last modified: by antisa
