Multiple values in Alert notification templating

Hello, I’m using Grafana 8.0.6 version in Linux.

I recently updated from Grafana 7 to Grafana 8 because I wanted to use the Alert notification templating like ${instance} in the title and description of my alerts.
I have many servers monitoring, so when I use the variable ${instance} in my alert title, if there are some servers in critical state, then the alert would be something like “Alert. The Server: x.x.x.1, x.x.x.2, x.x.x.3, x.x.x.4 is in critical state”
I know this is how it works (as the documentation of Grafana says “When there are multiple unique values for the same label, the values are comma-separated.” - Alert notification templating | Grafana documentation).

But I wanted to get one alert per server, and in every alert get the IP of each server using ${instance}.
Get something like:
“Alert. The Server: x.x.x.1 is in critical state”
“Alert. The Server: x.x.x.2 is in critical state”
“Alert. The Server: x.x.x.3 is in critical state”

This is because Im using AlertManager as my Notification Channel, so when I use the notification template ${instance}, the alerts are repeated because it creates several json objects with exactly the same alert title.

Is there a way to achieve what I want to do?

This topic was automatically closed after 365 days. New replies are no longer allowed.