influxdata / influxdata/kapacitor

Send event for first OK state change

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

Description

The docs for the AlertNode state this:

> Events are sent to handlers if the alert is in a state other than ‘OK’ or the alert just changed to the ‘OK’ state from a non ‘OK’ state (a.k.a. the alert recovered). Using the AlertNode.StateChangesOnly property events will only be sent to handlers if the alert changed state.

I cannot see a way to enable Kapacitor to send the initial state if the task goes from no-state directly to an ok-state - is it possible? If not, is it possible for a change to be made to allow for it?

It would not be safe for us to assume a lack of event means things are OK, as it could instead mean other parts of our system are experiencing issues.

Contributor guide

Open the contributing guide

Research direction

Start with the AlertNode state and event handling described in the issue, especially StateChangesOnly and the no-state-to-OK transition. Trace the existing tests for non-OK states and recovery, then add coverage for an initial OK event and confirm the existing event behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability
Issue type
Feature
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.