I am using Grafana 9.4 for dashboarding and alerting. I currently have an alert set up with:
- Query A:
- a Prometheus metric with labels like
{tenant="tenant1", ...}
and legend set to{{tenant}}
.
- a Prometheus metric with labels like
- Expression B (the alert condition):
- Classic_conditions
WHEN last() of A is above 100
- Classic_conditions
When triggering, the alert currently generates a notification similar to:
Firing
Value: B0=222.28333333333333
Labels:
- alertname = My alert name
- grafana_folder = My folder
- team = my-team
Annotations:
- summary = My summary
...
- Would it be possible to have a dynamic label that would contain my tenant's name? That way, I could silence the alert for a given tenant only? I tried a few values for the label thinking that some sort of templating was used but I couldn't get the proper syntax to have a value.
- How can I at least replace the
B0
in the notification with the actual tenant name from query A?