prometheus rule: check for expression value in range

家住魔仙堡 提交于 2020-08-24 09:38:09

问题


In a prometheus alert rule, how do I check for a value to be in a certain range?

for eg., (x > 80 && x <= 100); 

when x is a complex expression it feels unnecessary to evaluate it twice. is there another way to represent this expression?


回答1:


You can do x < 100 > 80 to chain them.



来源:https://stackoverflow.com/questions/45766533/prometheus-rule-check-for-expression-value-in-range

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!