influxdata / influxdata/kapacitor

Feature Request: Make 'publish' topic handler an AlertNode chain method

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

Say that I want to add a logging topic handler to every one of my Kapacitor alerts, but those alerts already have alternate topics defined (e.g. for email alerts, etc.).

The current paradigm seems to be that I would set up ``publish`` topic handlers for each pair of topics. So if I had three topics A, B, and C, and my new logging topic D, in total I would need to create:

* A
* B
* C
* D
* publish A, D
* publish B, D
* publish C, D

I would then need to update the tasks using A, B, and C and migrate them to the ``publish`` handlers. This is kind of tedious.

What would be a much better user experience is if the ``publish`` handler were a first-class ``AlertNode`` chain method, so that all I had to do was add my new topic handler D, and then update each of the TICKscripts.

E.g.

```
...etc... | alert()
.publish(['topic1', 'topic2', 'topic3'])
```

Or alternatively...

```
...etc... | alert()
.topic('topic1').topic('topic2').topic('topic3')
```

Contributor guide

Open the contributing guide

Research direction

Start by tracing the AlertNode chain methods and the existing publish topic handler in the Kapacitor codebase; the issue names no specific files or tests. Compare the proposed publish and topic chaining forms, then verify that a single added topic can be combined with existing alert topics without requiring duplicate publish handlers or task migrations.

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
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.