influxdata / influxdata/kapacitor

Resume alert

Open
#934 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

I would ask if it possible to have only one resume email/log/else when more trigger alerts occur. Below an example (tag 'host' has cardinality 2). If there is an alert on both the two tag values I receive two email alerts. This should be a problem if I have hundreds/thousands of tag values, I will receive a lot of emails. It should be useful to have only one email with alerts related to all the tag values with problems. Is it possible to configure a tick script for this?

```
batch
|query('''
SELECT mean("value") AS mean_check
FROM "monitor_db"."default"."random_test"
WHERE region='us-west'
''')
.period(10m)
.every(10m)
.groupBy(time(10m))
.groupBy('host', 'region')
|alert()
.id('ISAAC_TEST')
.message('KAPACITOR ALERTER -> {{ .Group }} {{ .Level }} ')
.info(lambda: "mean_check" >= 0.5)
.warn(lambda: "mean_check" >= 0.7)
.crit(lambda: "mean_check" >= 0.9)
.log('/tmp/alerts.log')
.details('''

{{ .ID }}


Measurement: {{ .Name }}

Level: {{ .Level }}

Groups: {{ .Group }}

Tags: {{ .Tags }}

Time: {{ .Time }}

Value: {{ index .Fields "mean_check" }}
''')
.email('someone@email.com')
```

Contributor guide

Open the contributing guide

Research direction

Start by tracing the alert() node and its .email() and .log() outputs in the Kapacitor codebase; the issue names no files or tests. Define how alerts from multiple grouped host values should be combined, then verify that one notification can represent all firing groups without losing their details.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability-sre
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.