influxdata / influxdata/kapacitor

[bug] Spread is not constrained to the values within a window (?)

Open
#1,793 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.4k
Forks
479
Avg merge
4d 16h
Merged PRs (30d)
4

Description

I am working on a script to alert on too many kubernetes pod restarts within a certain window of time. I may not be using spread correctly, but I would expect for it to only use values from the defined window to do its calculation. I wrote a script that writes out spread from outside a window and from within a window, and the values inside the window seem to take all values into account. Specifically, in the output csv below, I would expect the last entry to be 0 and not 9.

[Resulting Data (csv)](https://github.com/influxdata/kapacitor/files/1700295/fakerestartsalertresults.csv.txt)

[Input Data (line protocol)](https://github.com/influxdata/kapacitor/files/1700243/restartdata.txt)

[Tick Script](https://github.com/influxdata/kapacitor/files/1700319/restartswritestats_manual.tick.txt)

Running on a kubernetes v1.7.7 cluster
Relevant TICK images:
```
image:
## ref: https://hub.docker.com/r/library/kapacitor/tags/
repository: kapacitor
tag: 1.4.0-alpine
image:
## ref: https://hub.docker.com/r/library/chronograf/tags/
repository: chronograf
tag: 1.4.0-alpine
image:
## ref: https://hub.docker.com/r/library/influxdb/tags/
repository: influxdb
tag: 1.4.2-alpine
```

Contributor guide

Open the contributing guide

Research direction

Start by running restartswritestats_manual.tick.txt with restartdata.txt and compare the output with fakerestartsalertresults.csv.txt, focusing on the final window calculation. Then trace the spread implementation in Kapacitor and verify the behavior against the reported Kubernetes pod-restart case on the listed 1.4.0 images. Done means the final in-window value matches the expected 0 without regressing other spread calculations.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.