Prometheus Alerting Expression可检测到过去10分钟内现有时间序列或新时间序列没有变化

问题描述

我创建了一个Grafana仪表板,在其中可以绘制带有动态标签集的时间序列数据。

For Ex: At time t0,we can have time series T0 with counter value as 2
        At time t1,we can have time series T0 with counter value as 4 and a new time series T1 
        with counter value as 5 

现在,我想配置警报,以便可以检测最近10分钟内是否没有新的时间序列,或者最近10分钟内现有时间序列是否没有变化。

我已经写了下面的PromQL表达式,但是它不能按预期工作。

metric_name{CustomLabel="t0label"} offset 10m unless on (CustomLabel1,CustomLabel2,CustomLabel3) metric_name{CustomLabel="t0label"}

任何帮助将不胜感激。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)