the lost data

47 views
Skip to first unread message

anton...@gmail.com

unread,
Sep 7, 2018, 2:51:12 AM9/7/18
to Prometheus Users

store.jpg

in my prometheus i have a metric with name  rttMonLatestRttOperSense, the scrape time of this job is 2 seconds, when i query rttMonLatestRttOperSense[30s], why there are only two values ? I think there should be 15 values,  where is the problem or my understanding is wrong?





Chris Marchbanks

unread,
Sep 7, 2018, 2:00:50 PM9/7/18
to anton...@gmail.com, Prometheus Users
Hello,

The number of samples will be directly related to the scrape_interval of your job. If the scrape interval of your job is 2s, then is it be possible that the scrapes are taking a long time and missing several scrape intervals?
I don't think the resolution you have boxed does anything for instant queries.

Hope this helps!

On Fri, Sep 7, 2018 at 12:51 AM <anton...@gmail.com> wrote:

store.jpg

in my prometheus i have a metric with name  rttMonLatestRttOperSense, the scrape time of this job is 2 seconds, when i query rttMonLatestRttOperSense[30s], why there are only two values ? I think there should be 15 values,  where is the problem or my understanding is wrong?





--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/155f0fe8-c63c-4df5-90b6-0a6da880a67d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Chris Marchbanks | Engineer
FreshTracks.io - Intelligent Alerting for Kubernetes and Prometheus

anton...@gmail.com

unread,
Sep 9, 2018, 9:45:26 PM9/9/18
to Prometheus Users
Hi chris

     Actually in my lab,the scrape time of this job is indeed 2 seconds.And i do not think these query will be timeout , that is why i am so confused 

在 2018年9月7日星期五 UTC+8下午2:51:12,anton...@gmail.com写道:

anton...@gmail.com

unread,
Sep 10, 2018, 10:15:39 PM9/10/18
to Prometheus Users

test.jpg

I got a screenshot from my lab. it's obvious that in the last 1h the data are continuous, but why  when i query a[30s],there are only 2 values, when i using a[15s] there is even no any data ? 

在 2018年9月8日星期六 UTC+8上午2:00:50,Chris Marchbanks写道:

anton...@gmail.com

unread,
Sep 10, 2018, 10:37:59 PM9/10/18
to Prometheus Users
But when i using the query API , i can get the relevant values, so strange !!!

API.JPG

And if this does matters ? Since i need to use this query as the rule in my altermanager



在 2018年9月11日星期二 UTC+8上午10:15:39,anton...@gmail.com写道:

Chris Marchbanks

unread,
Sep 11, 2018, 11:29:53 AM9/11/18
to anton...@gmail.com, Prometheus Users
Sorry for the delayed response, I was out for a couple days.

If the data coming back from query has all 15 values you expect, then perhaps this is a bug? What version of prometheus are you using?
I tried reproducing this on master, and see all 15 values when using a 2 second scrape interval.

As far as using the query in a rule, as long as there are always 2 values in the range you should be ok (if doing a rate/histogram).
If the query endpoint is coming back with all the data, the alert should definitely be ok, since all the points will be in prometheus.

Screen Shot 2018-09-11 at 9.24.33 AM.png


For more options, visit https://groups.google.com/d/optout.

anton...@gmail.com

unread,
Sep 14, 2018, 3:01:55 AM9/14/18
to Prometheus Users
Hi Chris

      My prometheus' version is 2.2.1,i have no idea if it's a bug or not.but it seems that the other metrics are normal,when the metric scrape_interval is 30s,when i check the [2m] data,i can get 4 values.
      And if the rule can be conducted correctly that should be fine

在 2018年9月11日星期二 UTC+8下午11:29:53,Chris Marchbanks写道:
Reply all
Reply to author
Forward
0 new messages