kapacitor icon indicating copy to clipboard operation
kapacitor copied to clipboard

Reload kapacitor configuration file on signal

Open goller opened this issue 10 years ago • 8 comments

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.

goller avatar Jun 29 '16 19:06 goller

+1

hraftery avatar Jan 18 '17 04:01 hraftery

Kapacitor now allows the configuration to be modified via the API at runtime. Reloading configuration on disk is no longer as important.

nathanielc avatar Feb 01 '17 17:02 nathanielc

@hraftery Do you have a specific use case that isn't covered by the configuration API endpoints?

nathanielc avatar Feb 01 '17 17:02 nathanielc

@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 avatar Feb 01 '17 19:02 hraftery

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

nathanielc avatar Feb 01 '17 20:02 nathanielc

any update on adding UDF function through API ?

ahsanali avatar Nov 21 '17 14:11 ahsanali

Is there any authentication to use the api? I always got 204(no content). what's happend?

crazy-canux avatar Mar 28 '18 06:03 crazy-canux

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

pravindamodaran avatar Jul 01 '20 14:07 pravindamodaran