influxdata / kapacitor

Open source framework for processing, monitoring, and alerting on time series data
MIT License
2.32k stars 493 forks source link

Enabled task is not reloaded after updating it with HTTP PATCH request #1510

Open Tonius opened 7 years ago

Tonius commented 7 years ago

Description

When I update the TICKscript of an enabled task using a HTTP PATCH request, the task is not automatically reloaded by Kapacitor. Running kapacitor show does however show the updated script. To make Kapacitor use the updated script, I either have to use kapacitor reload, or disable and re-enable the task using two separate PATCH requests.

This behavior seems unintuitive to me, and I haven't read about it in the documentation. Is this the intended behavior of updating a task?

Environment

Test case

digaoddc commented 7 years ago

I am running on the same issue here, with Kapacitor 1.3, my point is that if you're using the API, your only current option is to send a request to disable and another request to enable a task. It is unnecessary overhead.

My opinion is to either accept a reload_automatically parameter in the API or do it automatically, this algo goes for the command line.

UZPENG commented 2 years ago

still had this problem. The only change is that the document note this obviously now, but i think provide a individual http parameter to reload task automatically is a better solution