influxdata / influxdata/kapacitor

Expand AlertNode message functionality

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

Hey guys,

I [posted](https://community.influxdata.com/t/using-kapacitor-vars-within-alertnode-message-property/2722) on the community forums little while back, but it's more of a feature request, so I thought I'd make an issue. Hopefully this isn't stepping on any toes.

Basically, I feel like it would be beneficial if we could include `var` values within the alert message, as well as provide more string manipulation. For example, I have a var `timeWindow` that I would like to include in my message (Eg. `The total error rate for the last {{ index .vars "timeWindow" }} minutes is: {{ index .Fields "error_rate" }}`). Additionally. things like splitting strings, converting to lowercase, etc. would all help towards creating useful messages.

While I know the Alert node does a lot, I can see how it would be difficult to transform it into a fully functional alerting system, but if I can just provide more succinct info to other systems (Eg. send a json blob of all the data I need to Sensu), I can process it there.

I don't think either of these are possible right now, but I'm open to any suggestions if anything similar is currently possible - Perhaps with a UDF? Otherwise I hope you can consider it for a future release.

Contributor guide

Open the contributing guide

Research direction

Start by locating the AlertNode message-template implementation and reviewing how vars and Fields are currently handled. Read the linked community discussion and the issue's UDF suggestion; before implementation, clarify which string operations and message data must be supported, since no file, test, or acceptance criteria is named.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.