influxdata / influxdata/kapacitor
Alerts are not triggered for each group in a batch query
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
I’m trying to monitor multiple freezers, reading their temperature. I’m grouping by multiple tags that uniquely identifies a freezer. The following is a sample of the script I’m trying.
var period = 15m
batch
|query(’’’
select “temperature” as value from device where “machineType” = ‘freezertype’
‘’’)
.period(period)
.every(1m)
.groupBy(‘mac’, ‘machineId’, ‘locationId’, ‘machineType’)
|alert()
.all()
.id(‘Freezer Temperature Alert’)
.message(‘Freezer Temperature is {{ .Level }} for the past ’ + string(period))
.crit(lambda: “value” > -14.5)
.stateChangesOnly()
.log(’/tmp/alerts.log’)
so if I have 2 groups (freezers), group A and group B.
When group A go out of range, I get a critical alert properly, but after it if group B go out of range, I won’t get an alert.
Is this normal? Am I doing anything wrong?
Contributor guide
Research direction
Reproduce the batch query with two freezer groups using the shown groupBy and alert().all().stateChangesOnly() chain. Investigate whether alert state is shared across groups, then determine whether each group should produce its own alert and verify the behavior with a focused reproduction.
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
- 25/100