influxdata / influxdata/kapacitor

alert rule is always set stateChangesOnly

Open
#1,991 2 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

hi, I configure the alert rule on alert-rule-builder of kapacitor which docker container is kapacitor:1.5.0-alpine.
The email configuration in kapacitor.conf is as follows:
[smtp]
enabled = false
host = "localhost"
port = 25
username = ""
password = ""
no-verify = false
global = false
state-changes-only = false
from = ""
idle-timeout = "30s"

The alertnode of tickscript is always as follows:
var trigger = data
|alert()
.crit(lambda: "value" > crit)
**.stateChangesOnly()**
.message(message)
.id(idVar)
.idTag(idTag)
.levelTag(levelTag)
.messageField(messageField)
.durationField(durationField)
.email()
.to('smith@qq.com')

I have set " state-changes-only = false". Why does the alertnode have "stateChangesOnly()"?

Contributor guide

Open the contributing guide

Research direction

Start by tracing how the alert-rule-builder reads kapacitor.conf, especially the smtp state-changes-only setting, and how it generates the alertnode in the tickscript. Compare the generated .stateChangesOnly() call with the configured false value; done means the behavior is explained or corrected and covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
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.