{{tag>monitoring notifications}} ====== Grafana to rocketchat notifications ====== First set create the **Contact point** under **Alerting** and add [[https://docs.rocket.chat/docs/integrations#incoming-integrations|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. { "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": "Link to below dashboard", "title_link": "{{ range .Alerts }}{{ .DashboardURL }}{{ end }}", "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 ====== * https://docs.rocket.chat/docs/integrations#webhook-url-format * https://grafana.com/docs/grafana/latest/alerting/fundamentals/alert-rules/annotation-label/#label-types * https://grafana.com/docs/grafana/latest/alerting/configure-notifications/template-notifications/reference/#alert