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

Allow reloading via webhandler #923

Closed
swsnider opened this Issue Jul 22, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@swsnider
Copy link
Contributor

swsnider commented Jul 22, 2015

Right now, config can only be reloaded by sending SIGHUP to prometheus's process. It would be significantly easier for the automation that I'm writing to distribute our configuration to our prometheus instances if we were able to do the equivalent from a POST to the prometheus http server.

Is this something that you've already decided was a bad idea? I notice that in #108, you decided against file watches for different reasons than would seem to apply here.

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Jul 30, 2015

We already have a feature to quit Prometheus remotely (optionally enablable by setting the -web.enable-remote-shutdown command-line flag): https://github.com/prometheus/prometheus/blob/master/web/web.go#L170-L172

So unless we want to also remove that (I don't think anyone actually uses it), it could make sense to also add a reload endpoint. You'd probably just need to pass this channel to the web handler and make the handler send signals over it when called:

hup := make(chan os.Signal)

@swsnider

This comment has been minimized.

Copy link
Contributor Author

swsnider commented Jul 31, 2015

I have actually used the quithandler because sometimes we get phantom jobs, but maybe that just means I'm the only one.

Your suggested solution is more elegant than mine was -- I just had the web handler send SIGHUP to itself. The channel is a better idea :)

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Sep 14, 2015

This was implemented in #976

@juliusv juliusv closed this Sep 14, 2015

@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.