prometheus 规则查询没数据则返回0

no data as zero

And to solve this, you just need to add OR on() vector(0) to the end of your expression. It will return 0 if the metric expression does not return anything

posted on 2022-12-01 17:55  每天进步一点点点点点  阅读(858)  评论(0)    收藏  举报