Kapacitor: Enabled task is not reloaded after updating it with HTTP PATCH request

Created on 4 Aug 2017  路  1Comment  路  Source: influxdata/kapacitor

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

  • Xubuntu 16.04.2 LTS (64-bit)
  • Docker version 17.05-0-ce, build 89658be
  • Running Docker image kapacitor:1.2
  • Kapacitor version 1.2.1 (git: master 4628bda2e3fbcc43df694707ec3f640f213cb0dc)

Test case

  • Create a new task with the following script: stream|from().database('testdb').measurement('test')|log().prefix('prefix1')
  • Make sure the task is enabled.
  • Insert a value into the measurement test of the database testdb.
  • Kapacitor should log the measurement with prefix prefix1.
  • Perform a PATCH request to change the script of the task to the following: stream|from().database('testdb').measurement('test')|log().prefix('prefix2'). Only the logging prefix is changed here.
  • Run kapacitor show with the ID of the task. It should show the newly updated script.
  • Insert a value, just like before.
  • Kapacitor should still log the measuremen with prefix prefix1.
  • Reload the task, either by using kapacitor reload or by using two PATCH requests that disable and re-enable the task.
  • Now Kapacitor should log the measurement with the new prefix prefix2.

Most helpful comment

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.

>All comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

evan-ty picture evan-ty  路  5Comments

juise picture juise  路  7Comments

rconn01 picture rconn01  路  6Comments

mgresser picture mgresser  路  4Comments

seletskiy picture seletskiy  路  3Comments