Hello Everyone!
I have a following query in my alert:
100 -
(
avg(node_memory_MemAvailable_bytes{job="node-exporter", instance="211.111.11.111:9111"}) /
avg(node_memory_MemTotal_bytes{job="node-exporter", instance="211.111.11.111:9111"})
* 100
)
And my query in alert and condition looks like this(look at image):
I want to have a following alert text: Instance 211.111.11.111:9111 has 60 point of Memory Usage when Threshold is 50. Investigate the problem
So I want to template instance ip and last value of Memory Usage right now,
I have tried to use {{ $values.B }} and it resulted in .
Only success I had when using {{ $value }} and as output I got this information:
Instance 211.111.11.111:9111 has [ var='B0' metric='100 -
(
avg(node_memory_MemAvailable_bytes{job="node-exporter", instance="211.111.11.111:9111"}) /
avg(node_memory_MemTotal_bytes{job="node-exporter", instance="211.111.11.111:9111"})
* 100
)
' labels={} value=41.96771814524034 ] % of Memory Usage. Investigate the problem
And out of this I need to get value=41.96771814524034
Any help is appreciated. Thanks!