Monitoring 普罗米修斯-如何从范围查询中过滤出过时的度量?
在我的Prometheus实例中,我将Monitoring 普罗米修斯-如何从范围查询中过滤出过时的度量?,monitoring,prometheus,promql,Monitoring,Prometheus,Promql,在我的Prometheus实例中,我将storage.tsdb.retention.size设置为128GiB,将storage.tsdb.retention.time设置为0s,因此Prometheus会保留旧数据,直到达到128 GB的限制 现在,我有一些时间序列已经很长一段时间没有更新了(即过时)。如果我对最近的过去进行范围查询,其中过时的度量不再存在,那么一切都很好 例如,PromQL查询: > metric{label1="foo"}[1d] 返回: ...
storage.tsdb.retention.size
设置为128GiB
,将storage.tsdb.retention.time
设置为0s
,因此Prometheus会保留旧数据,直到达到128 GB的限制
现在,我有一些时间序列已经很长一段时间没有更新了(即过时)。如果我对最近的过去进行范围查询,其中过时的度量不再存在,那么一切都很好
例如,PromQL查询:
> metric{label1="foo"}[1d]
返回:
...
metric{label1="foo"} <value>@<timestamp> # <== OK, fresh time series
...
metric{label1="foo"} <value>@<timestamp> # <== OK, newest timestamp right now
...
metric{label1="foo",label2="bar"} <value>@<timestamp> # <== !! newest timestamp one month ago!
返回:
...
metric{label1="foo"} <value>@<timestamp> # <== OK, fresh time series
...
metric{label1="foo"} <value>@<timestamp> # <== OK, newest timestamp right now
...
metric{label1="foo",label2="bar"} <value>@<timestamp> # <== !! newest timestamp one month ago!
。。。
公制{label1=“foo”}@#