influxdata / influxdata/kapacitor
Kapacitor script fails to execute fully if measurement doesn’t exist - Alert trigger desired
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
Running Kapacitor 1.3.1 ...
I have a simple Kapacitor script that does a `batch|query()` with a `count()` of datapoints and does it’s alerting based off of this count value.
The script works long as the measurement already exists in Influx (i.e., assumes at least one previous datapoint has been inserted).
HOWEVER, if the the measurement does not (yet) exist in Influx, the intended / expected behavior is that the query would return a count value = 0, and an alert could be triggered off of this. Instead, it appears that Kapacitor nodes following the `query()` node are not executed (e.g.,`|log()` and most importantly `|alert()` do not run).
Seems like an edge case where you might be testing for ‘No Data’, but assumes some pre-existing data (say, prior to time window being presently queried) is/was available. Perhaps I’m missing something, but seems that this behavior is not ideal.
Bug? Workaround? Am I thinking about this wrong?
Contributor guide
Research direction
Reproduce the behavior with Kapacitor 1.3.1 using a batch|query() count against a measurement that does not yet exist, then trace how the query result is handled by downstream |log() and |alert() nodes. Done means the expected no-data behavior is established and the issue has either a confirmed fix path or a documented workaround.
Written by the indexing model from the issue text.
Assessment
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100