-
Notifications
You must be signed in to change notification settings - Fork 55
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
signal to reload changes within queryDir #23
Comments
Good suggestion. I have actually run into this myself. This is a good idea. Another option is to add a |
Would the fsnotify idea force users into atomically copying the changed configs? (like a copy-to-temp then rename to .yml). |
@andybrown668 Yes good point. I suppose if only the config files are being watched then any queries in a directory or file could be updated prior to "touching" the config files to trigger the change. Or the primary config could be the only thing that triggers the reload. That being said, the SIGHUP solution is simpler and likely preferred because of this case. That would be great if you could investigate this! |
cool - please give me a week to come up with something; could be sooner, but I don't want to overpromise or block someone else contributing if I'm too slow getting it done |
I just whipped this up to handle this issue |
@mscifo Nice solution! |
Another solution that would be useful would be to have a rest end point to force reload like prometheus. Then, one can use a side container in kubernetes to reload the main one on config map change : |
Thank you for this work!
I use this in a production environment and deploy changes to contents of a queries folder with ansible.
But I currently need to restart the prometheus-sql container to make it notice the changed queries.
It'd be great if prometheus-sql could respond to a signal (SIGINT?) and reload the queries.
cheers
Andy
The text was updated successfully, but these errors were encountered: