justwatchcom / sql_exporter

Flexible SQL Exporter for Prometheus.
MIT License
402 stars 109 forks source link

Seamless configuration reload like Prometheus #26

Open FruhGab opened 5 years ago

FruhGab commented 5 years ago

Hello, I have one issue with this exporter, which we are using in production for several months. It seems we can't reload configuration on the fly, like we can with Prometheus or Alertmanager for instance. This is actually a problem, because we must restart the container everytime we change the configuration (we're using Docker) but it also executes all SQL requests again and new alerts are fired for every request even if there is no error. I searched into the documentation and did not find anything.

If such a mechanism do not exists yet, will it be hard for you to implement something like with Prometheus where we only send a HUP kill signal to the main processus thus reloading the configuration ?

Thanks in advance !

dewey commented 2 years ago

Willing to accept a PR that reloads the config without a restart. It could also be done through a HTTP POST request to the /-/reload like Prometheus itself.