Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upPrometheus not returning all metrics #2258
Comments
This comment has been minimized.
This comment has been minimized.
|
Yes, that is the result that would be expected. What is Also you don't need to set refresh_interval, as that's just a fallback in case inotify doesn't work. |
This comment has been minimized.
This comment has been minimized.
|
Hi Brian up{job="blackbox_icmp"} in prometheus UI returns a different number of results every time. I get between 10 lines to any number but still below the number of targets in the targets file. Thanks for the advice on the refresh_interval. |
This comment has been minimized.
This comment has been minimized.
|
What that sounds like is your Prometheus is overloaded and getting throttled. Are there messages about throttling in the logs? |
brian-brazil
added
the
kind/question
label
Dec 6, 2016
This comment has been minimized.
This comment has been minimized.
|
I don't see any mention of throttling in the logs nor any errors. Prometheus is just logging checkpointing. I will look into the reasons for prometheus throttling from other issues here. I presume I should start by decreasing targets and increasing scrape intervals. time="2016-12-06T14:20:49Z" level=info msg="Starting prometheus (version=1.2.1, branch=master, revision=dd66f2e94b2b662804b9aa1b6a50587b990ba8b7)" source="main.go:75" |
This comment has been minimized.
This comment has been minimized.
|
In that case the number of targets in those files are probably changing quite a lot. If you keep those files unchanged for a while, do you still see the issue? |
This comment has been minimized.
This comment has been minimized.
|
This is solved. The client that displays prometheus web UI had a system clock ahead of linux server hosting prometheus. When executing the UP query in the prometheus UI the request timestamps were slightly in the future which did not return all metrics as they had not be all been scraped yet. The HTTP request from the prometheus UI is below. I checked the unix time on the linux server and it was behind. Once I synced the times on client and server, UP metrics for all targets were returned every time. /prometheus/api/v1/query?query=up&time=1481108856.537&_=1481105072244 thanks for your help on this Brian. |
This comment has been minimized.
This comment has been minimized.
|
That's a bit odd, you should still have seen the data from the previous scrape. |
grobie
closed this
Mar 5, 2017
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 23, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
simonaws commentedDec 6, 2016
What did you do?
We are running prometheus and using blackbox exporter to ping 60+ targets and HTTP request + 10 web api targets.
What did you expect to see?
count(probe_success{job="blackbox"}) returns a different count every time executed in prom UI. It seems that prometheus is not returning all scrapes.
Should we expect to see count(probe_success{job="blackbox"}) equal to the number of targets in our config file for that job?
What did you see instead? Under which circumstances?
We want the query count(probe_success{job="blackbox_icmp"}== 1) to return the number of targets up and count(probe_success{job="blackbox_icmp"}== 0) to return the number of targets down but these queries result in different answers every time.
Environment
System information:
Linux 3.10.0-327.36.1.el7.x86_64 x86_64
Prometheus version:
prom/prometheus:v1.2.1
Prometheus configuration file: