influxdata / influxdata/kapacitor

Drop/Ignore back-filled points

Open
#815 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

new-feature
Dominant language
Go
Stars
2.4k
Forks
479
Avg merge
4d 16h
Merged PRs (30d)
4

Description

We have a deadman alert to fire if we don't see points in some measurement after 5 minutes. It works great in steady state, but we have had some false negatives due to older points getting backfilled into InfluxDB.

The general sequence of events is:
- Points stop being produced. 5 mins later alert fires
- We backfill points from 2 weeks ago. Alert goes back to OK state

We would like to avoid getting into an OK state if a point older than 5 minutes is inserted for that measurement. How can we only consider points with a relevant timestamp?

The tickscript looks like this:

```
var b = stream
|from()
.database('myDb')
.retentionPolicy('autogen')
.measurement('myMeasurement')
.where(lambda: "field" =~ /^regex$/)
b
|deadman(1.0, 5m, lambda: (MATCHES_CRON))
.id('alertId')
.message('{{ .ID }} is {{ .Level }}: {{ index .Fields "emitted" | printf "%.0f" }} points seen in last 5m')
.stateChangesOnly()
.post('http://myalertsystem.com')

```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The entry point is the shown TICKscript stream and deadman pipeline; start by tracing how deadman counts points within its 5m window and handles point timestamps. Done means inserting points older than five minutes cannot move the alert from fired back to OK, while current points still do.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability, stream-processing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.