Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometheus should try to create consul discovery forever or fail on startup #1707

Closed
discordianfish opened this Issue Jun 6, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@discordianfish
Copy link
Member

discordianfish commented Jun 6, 2016

If Prometheus is configured to use consul sd but consul is down when Prometheus starts, it tries to connect to consul and fails but still comes up.
The result is a up and running Prometheus server which doesn't scrape the configured targets.

Instead Prometheus should try to connect to consul forever or fail on startup.

@discordianfish

This comment has been minimized.

Copy link
Member Author

discordianfish commented Jun 6, 2016

This applies to all other SD providers as well. First I tended towards failing on startup but the nice thing about using promtool to check config is to know that if it's okay, Prometheus will start. Which makes me prefer trying to reconnect forever and have a error counters for the SD providers.

@roman-vynar

This comment has been minimized.

Copy link
Contributor

roman-vynar commented Sep 26, 2016

According to the code, when you set datacenter option in your config (consul_sd_configs section), it won't be a problem on startup. Prometheus will retry to get service list as it normally does.

The problem is when datacenter is not set, Prometheus tries to get it once on startup from Consul which is down and discovery fails to run and didn't restart.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 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.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.