Templating

28 views
Skip to first unread message

Chaitanya Bayana

unread,
Nov 25, 2020, 1:37:32 AM11/25/20
to Prometheus Users
Hi All,

We have configured multiple Prometheus alerts with one single template in Alertmanager configuration and every alert is triggered with Runbook and Grafana link.
Now the problem is,  All my alerts are referring to different Grafana dashboards. Currently whenever we receive any alert, its always showing one Grafana dashboard which is not correct. We have hardcoded the Grafana link in the template. We want something like below.
So is there a solution to achieve this problem. If yes, where exactly I need to make the changes, alertmanager or at alerts?.

Eg:     ALERT1    >>>   GRAFANA1 DASHBOARD LINK 
          ALERT2     >>>   GRAFANA2 DASHBOARD LINK

Current sample templating:

{{ define "pagerduty.default.description_runbooklink" }} *Runbook:* https://dev.runbook.com/confluence/promalerts {{ end }} {{ define "pagerduty.default.description_datacenter" }} *Datacenter:* us-india-1 {{ end }} {{ define "pagerduty.default.description_grafanalink" }} *Grafana Dashboard:* https://grafana.dev.com/services-dashboard {{ end }}  



Thanks & Regards,
Chaitanya
Reply all
Reply to author
Forward
0 new messages