Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent behavior with first/last data points #32

Open
davidheitman opened this issue Apr 30, 2019 · 0 comments
Open

Inconsistent behavior with first/last data points #32

davidheitman opened this issue Apr 30, 2019 · 0 comments

Comments

@davidheitman
Copy link

davidheitman commented Apr 30, 2019

I have the following kapacitor-unit test file (sorry for the formatting, github seems pretty insistent on displaying the dashes as bullet points):

`tests:

  • name: "Alert my_alert:: critical when value < 1314873000"
    task_name: my_alert.tick
    db: telegraf
    rp: autogen
    type: stream
    data:
    • my_measurement,my_tag=matching_tag_value value=3629746000
    • my_measurement,my_tag=matching_tag_value value=2629746000
    • my_measurement,my_tag=matching_tag_value value=2629745999
    • my_measurement,my_tag=matching_tag_value value=1314873000
    • my_measurement,my_tag=matching_tag_value value=1314872999
    • my_measurement,my_tag=matching_tag_value value=314873000
    • my_measurement,my_tag=matching_tag_value value=3629746000
      expects:
      ok: 2
      warn: 1
      crit: 1
      `
      Sometimes this generates the correct expects of 2 OKs. Sometimes it generates 1 OK, sometimes 0 OKs. If I double up the first and last data points, sending each one twice, it is far more consistent, but still sometimes fails to generate one or both OK states. This behavior indicates that sometimes kapacitor-unit is missing the first/last one or more data points. Likely a race condition where the task is not registered and enabled in Kapacitor prior to sending the data points, and possibly that the task is disabled/deleted prior to receiving all data points.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant