Most recent value or last seen value

后端 未结 4 1269
太阳男子
太阳男子 2021-01-04 03:19

Prometheus is built around returning a time series representation of metrics. In many cases, however, I only care about what the state of a metric is right now<

4条回答
  •  孤城傲影
    2021-01-04 04:24

    I had a similar issue with metrics I was getting from AWS via prom/cloudwatch-exporter. It seems AWS takes awhile to converge its CloudWatch metrics. It used to be about 10 minutes but now it's more like 13 minutes. We've been missing issues like disk space low because these metrics utterly fail to make it to prometheus, therefore our alerts were useless.

    I found "offset" useful here, where I wanted the last metric but it was outside of the 5m cutoff. So by specifying an offset, I can still pick up a value instead of nothing. Example:

    aws_ec2_cpuutilization_average offset 15m
    

提交回复
热议问题