Metrics offset value definition

28 views
Skip to first unread message

snedi

unread,
May 14, 2020, 7:12:42 AM5/14/20
to Prometheus Users

In the Readme it is mentioned about the Timestamps:


In practice this means that if you evaluate an instant vector at the current time, you will not see data from CloudWatch. An expression such as aws_elb_request_count_sum offset 10m will allow you to access the data, and should be used in recording rules and alerts.


https://github.com/prometheus/cloudwatch_exporter#timestamps


It is not clear if it is enough to choose any offset that just allows to fetch the values and see them in the query response or this offset should somehow be calculated based on some other parameters or data from CloudWatch?

Sally Lehman

unread,
May 16, 2020, 12:46:08 AM5/16/20
to Prometheus Users
It looks like Cloudwatch specifies that they send new metrics over at 5m or 1m intervals. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch-new.html 

The doc you linked mentions that the exporter checks every 10m by default. It looks like that is set here in
src/main/java/io/prometheus/cloudwatch/CloudWatchCollector.java
148:        int defaultRange = 600;
152:        int defaultDelay = 600;

snedi

unread,
May 17, 2020, 5:27:57 AM5/17/20
to Prometheus Users
Those are different I guess. I am trying to figure out the offsets that I would pass in the metric query when setting an alert in the alertmanager.
Reply all
Reply to author
Forward
0 new messages