Using tag value in alert message

Is there a way to use something like [[tag_SOMEKEY]] as part of the alert message/title?

I know that the raw data is sent as part of the alert but I want to show some customized message/title in the alery

1 Like

no this is not currently possible.

Any update here? It seems like a pretty normal use case to alert WHICH tag is involved when an alert is produced.

For example, if I have a dashboard that alerts on a query that contain a group by {tag} clause, e.g. cpu usage for all servers in a large cluster, and one (or more) of the grouped by items exceeds the alerting threshold, an alert IS triggered. (So, I know that the alerting engine has this data.)

It would be nice to know which server tripped the alert; actually, it’s rather odd that you could send a alert and not expose a way to describe which one threw the alert.

On a related note, if an alert is tested, and there are several of the items that are in an alert state, the alert tester will display a json-like object that lists all of the alerting entities. It would be nice to have access to that json object to display the various object that are in a alerting state. Again, the data seems to be there, but I can’t figure out how to access it with the default alerting page.

If this is not possible, is there some other recommendation?

1 Like

It’s time this got fixed. It seems I have 2 options currently, neither of which work. I alert our Teams teams Alert (who named a channel teams in a software called Teams?? :rofl: ). So it becomes either:
[[tag_system-name]] 5
or
idrac-hosts.mean { system-… 5
neither of which actually tell me the name of the system.

Funny though, the width of the Teams window would allow for more info in it, but for some reason it is cut off. But I did notice that if I try to copy paste the data here for example, I get more data into the clipboard:
idrac-hosts.mean { system-name: subtle-iguana } 5.
Which I also get if I hover the mouse over it. But needless to say, I don’t need the "idrac-hosts.mean { system-name} part of the message. I need the subtle-iguana part to identify which server caused an alert.

Next thing on request would be to be able to do value mappings in the alert. That 5 should be “Critical”.
It would be awesome if if the alert included what exactly is the problem…say “CMOS Battery Critical” or “Intrusion alert triggered” or something, which would require further new queries to be performed once a condition triggers the alert. This kind of chain of events could perhaps be easily done with webhooks that trigger a script on a system that in turn could send a whole new customized message to teams not limited by the capabilities of Grafana currently… hmmm, I wonder if someone has done that already…