Reload kapacitor configuration file on signal
I'd like to avoid kapacitor downtime when change the kapacitor configuration file. I'd like to see kapacitor take a SIGHUP or SIGUSR1 to mean reload configuration file without restarting the process.
+1
Kapacitor now allows the configuration to be modified via the API at runtime. Reloading configuration on disk is no longer as important.
@hraftery Do you have a specific use case that isn't covered by the configuration API endpoints?
@nathanielc I only had two use cases. The API endpoint solves one but not the other.
- Use case 1: updating the SMTP configuration.
The API allows me to update the SMTP configuration. It's certainly more cumbersome than a SIGHUP, but appears to do the job. I say "appears" but there doesn't appear to be a way to verify the password has been set. I used:
curl -H "Content-Type: application/json" -X POST -d '{ "set":{ "password": "aaa" } }' http://127.0.0.1:9092/kapactor/v1/config/smtp/
- Use case 2: adding a UDF function.
There does not appear to be an API endpoint to add or modify UDF functions.
So the configuration API endpoints look like a good improvement, but do not solve the issue.
@hraftery Thanks for the specifics. Reopening issue till we have a solution.
You can verify the password has been set by making a GET request to:
curl -H "Content-Type: application/json" http://127.0.0.1:9092/kapactor/v1/config/smtp/
The password itself will not be returned in plain text but a boolean flag will be returned indicating whether a password has been set or not.
any update on adding UDF function through API ?
Is there any authentication to use the api? I always got 204(no content). what's happend?
@nathanielc http-post endpoint does not get created properly through REST API. Opened #2363 . Looks like the http-post handler does not use the created endpoint, and hence the URL is empty.