While configuring the alert notification message, I have to write the message dynamically such as if node 1 is down, the message will be: Node1(value is taken from a variable) is down.
Grafana already has that feature to send the respective node name when you setup the graph using the query by node. I am not sure if you have tried that option.
example in prometheus: up{job=“node-exporter”} would provide a number, if it is zero grafana will alert on respective node.
For anyone watching this long lived thread, please have a look at message templating in Grafana 8 alerts. @hoangmnsd I would recommend that you try our a newer release. We’ve made a ton of updates to templating, variables, etc in the past few releases.