0

I have a following query for getting node memory

100 -
(
  avg(node_memory_MemAvailable_bytes{job="node-exporter", instance="211.111.81.111:0000"}) /
  avg(node_memory_MemTotal_bytes{job="node-exporter", instance="211.111.81.111:0000"})
* 100
)

I want output in my alert message something like this:

Attention, threshold of 50 is passed. Server with ip 211.111.81.111:0000 has 57 of Memory Usage. Investigate the problem

How can I template the text of alert to output both ip of instance and last value of metric?

From what I got in the internet, however it is not working:

Server with ip 211.111.81.111:0000 has {{ $__value }} % of Memory Usage. Investigate the problem. But this is not working

enter image description here

Jan Garaj
  • 25,598
  • 3
  • 38
  • 59
  • Your query doesn't return any data. Make sure you have correct query and it returns also labels, which can be used in the alert message. – Jan Garaj Jan 27 '23 at 11:28

0 Answers0