Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can we write alert rule comparing with the previous value for the prometheus alert rule

I am trying to setup an alert rule for elastic search number of nodes. If the number is less than the previous number , then i need an alert. I don't want to hard code the value. Since number of nodes are vary for each cluster.

I am searching but couldn't able to find the answer, may be my search was wrong.

like image 419
Anil Kumar Avatar asked Sep 15 '25 23:09

Anil Kumar


1 Answers

To alert this case, you can use

metric < metric offset 1m

Which will alert each time the value decrease in 1m. But be aware that resolve will be false here.

like image 102
Armatorix Avatar answered Sep 19 '25 16:09

Armatorix