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

Implement Configuration and Target Reloading via Disk Watches #108

Closed
matttproud opened this Issue Mar 28, 2013 · 26 comments

Comments

Projects
None yet

@ghost ghost assigned bernerdschaefer May 14, 2013

@mwitkow

This comment has been minimized.

Copy link
Contributor

mwitkow commented Feb 3, 2015

+1
Would be awesome if we didn't need to restart Prometheus to re-read configs and consoles

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Feb 3, 2015

I'm likely to get to this in the next few weeks.

@bernerdschaefer bernerdschaefer removed their assignment Mar 20, 2015

@discordianfish

This comment has been minimized.

Copy link
Member

discordianfish commented Apr 7, 2015

@brian-brazil That'd be awesome. Now restart prometheus automatically by using https://github.com/docker-infra/prometheus-consul and I hope I won't run into issues for now.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Apr 7, 2015

I haven't touched this since then unfortunately.

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Apr 7, 2015

@fabxc will likely work on this as part of his internship.

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented Apr 7, 2015

This will probably be on hold until service discovery is done, though - unless it's considered super urgent.

@mwitkow

This comment has been minimized.

Copy link
Contributor

mwitkow commented Apr 7, 2015

How do you guys want to do service discovery? :)

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Apr 7, 2015

http://prometheus.io/docs/introduction/roadmap/#support-for-more-types-of-service-discovery is the roadmap entry. We are in the design state right now.

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented Apr 13, 2015

We'll also want to reload the config on SIGHUP. Not all file systems (natively) support watches.

@matthiasr

This comment has been minimized.

Copy link
Contributor

matthiasr commented Apr 13, 2015

I would even prefer to have disk watches be optional. I'd much prefer explicit SIGHUPs in many cases (e.g. when I can't guarantee that the config file is replaced atomically).

@discordianfish

This comment has been minimized.

Copy link
Member

discordianfish commented Apr 13, 2015

👍 on having both
@fabxc: If SD will integrate easily with consul and have a way to use the consul tag as label value, I don't really need the config reload anymore. Otherwise it would be more important to me to get the config reload first.

@levilovelock

This comment has been minimized.

Copy link

levilovelock commented Apr 16, 2015

I'm in the same position as @discordianfish - would prefer just having SD first, but config refresh would let me brew my own workaround at least.

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Apr 17, 2015

@levilovelock Just work-wise, it makes much more sense to get SD in order first as a base for implementing sane reloadable configs. Expect both soon[tm].

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented May 7, 2015

We'll also want to reload changed rule files.

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented May 21, 2015

We had a discussion that it might be better to reload only upon SIGHUP (which is implemented by now).

Does anybody feel a strong need for a file watch? If yes, I'd be willing to make the point against it.
Otherwise, I'll just close this.

@beorn7 beorn7 self-assigned this May 21, 2015

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented May 21, 2015

For configuration, a HUP is safest as it lets you do atomic changes.

@dylanmei

This comment has been minimized.

Copy link

dylanmei commented May 21, 2015

This work is great. I can use console-template or confd to handle config changes and fire the SIGHUP.

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented May 21, 2015

As we don't apply bad config/rules it would work but so far we all agreed
that SIGHUP is the way to go.

On Thu, May 21, 2015 at 6:44 PM Dylan Meissner notifications@github.com
wrote:

This work is great. I can use console-template or confd to handle config
changes and fire the SIGHUP.


Reply to this email directly or view it on GitHub
#108 (comment)
.

@discordianfish

This comment has been minimized.

Copy link
Member

discordianfish commented May 22, 2015

👍 for SIGHUP only. If someone needs disk watches they can use a simple shell fragment like:
while inotifywait -e close_write prometheus.conf; do service reload prometheus; done

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented May 22, 2015

Thanks for your feedback. Closing.

@mingfang

This comment has been minimized.

Copy link

mingfang commented Sep 6, 2015

I like the way nginx works.
nginx -t to test a config.
If the test succeeds then nginx -s reload to reload the config without restart.
This worths perfectly with confd and etcd combination.

@discordianfish

This comment has been minimized.

Copy link
Member

discordianfish commented Sep 6, 2015

@mingfang That's pretty much how prometheus works: Use the promtool to check the config, then send prometheus a HUP signal.

@mvmn

This comment has been minimized.

Copy link

mvmn commented Nov 15, 2016

How often can I do reload?
What if I implement a custom server to manage rules, and it will send POST to /-/reload every time I edit and save a rule - can that impair Prometheus performance significantly if reloads will happen often (say, every minute)?

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Nov 15, 2016

Once a minute should be fine

@mvmn

This comment has been minimized.

Copy link

mvmn commented Nov 15, 2016

Good. Thanks!

simonpasquier pushed a commit to simonpasquier/prometheus that referenced this issue Oct 12, 2017

Merge pull request prometheus#108 from sdurrheimer/master
Docs adjustments with latest changes
@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.