Unstable query

12 views
Skip to first unread message

CG

unread,
Oct 31, 2020, 9:10:27 PM10/31/20
to Prometheus Users
Not sure what is happening here, 

When I run the below query. I don't see any datapoint

up{job="myjob"}
nodata

but when I run

(up{job="myjob"}[10m])
up{instance="10.241.0.10:9100,job="my job"}             1 @1604192269.094

I don't see any scraping issues, how can I troubleshoot?

Cheers
CG

Brian Candler

unread,
Nov 1, 2020, 3:06:09 AM11/1/20
to Prometheus Users
What is your scrape interval? An instant query will not look any further than 5 minutes in the past to find the current value (this is configurable with a command-line flag).

If you only see one data point returned by up[10m] then this suggests that you're probably using a 10 minute scrape interval.

The Prometheus recommendation is to use a scrape interval of *no more than* 2 minutes.  This avoids the timeseries going stale if one scrape fails.
Reply all
Reply to author
Forward
0 new messages