influxdata / influxdata/kapacitor

How to use variable name inside alert.email property ?

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

i have a the following script :
`|eval(lambda: regexReplace(/\.\S+\.[0-9]+/,"project",'@gmail.com'))
.as('userid')
.keep()
|alert()
.id('kapacitor/{{ .TaskName }}')
.email(userid)`

This gives me the error :
invalid TICKscript: name "userid" is undefined. Names in scope: time,batch

Contributor guide

Open the contributing guide

Research direction

Start with the TICKscript using eval(), alert(), and email(userid), then inspect how alert email properties and variable scope are validated. Reproduce the reported undefined-name error and determine whether variable-based email values are supported; document the supported behavior or define the required change.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability-sre
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.