How to include metric and its value in alert tags

  1. I’ve configured alert to send to Alertmanager and when it fires I can see “alertname” set correctly as per the alert title in Grafana and alert message also is there in the descirption filed in the alert manager. There is also a label metric=“prom-01” (that the hostname) but I don’t see any label with the metric value?. How to add it?

  2. Also I can see that I can statically add tags for alert which then show up as lables in alertmanager, but how can I made the alert tag value dynamic through some templating/variable interpolation? For example if I wanted to add a tag “instance_name”=$metric and then another tag to get metric value, how would I do that?



Hello @tomsucho
I would like to ask you if you were able to resolve this, because I want to get the metric and value in every alert from the alertmanager json