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 updating service discovery from Consul #3314
Comments
juliusv
added
the
component/service discovery
label
Nov 9, 2017
This comment has been minimized.
This comment has been minimized.
or4cle
commented
Nov 14, 2017
|
FWIW, we have encountered the same issue, on Prometheus 1.7.1. The workaround was also the same (send SIGHUP). |
This comment has been minimized.
This comment has been minimized.
|
I did a big refactoring of the SD Service discovery if you want to give it a try and report if the bug is still there. Here is a link to download an executable for Linux 64bit |
This comment has been minimized.
This comment has been minimized.
|
As we haven't heard back from you in some time I'm going to presume that this was resolved in 2.x when SD was changed there. If not, please reopen. |
brian-brazil
closed this
Apr 3, 2018
This comment has been minimized.
This comment has been minimized.
vishksaj
commented
Sep 24, 2018
|
facing same issue in 2.2.1 |
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. |
zemek commentedOct 18, 2017
What did you do?
We configured 2 Prometheus servers in HA (running same config) to discover targets using Consul.
What did you expect to see?
Both Prometheus servers to scrape all of the targets that are registered in Consul
What did you see instead? Under which circumstances?

At first it was fine, but when we had more instances spin up, only one Prometheus server started scraping the new targets. Here is a graph:
rate(prometheus_target_interval_length_seconds_count{interval='15s'}[5m])*15prometheus_sd_consul_rpc_duration_seconds{quantile='0.5', call="service"}Sending a SIGHUP to the bad Prometheus server ended up resolving the issue. I don't think this would be caused by config since there weren't any changes, and it did initially get the full list of hosts.
Environment