influxdata / influxdata/kapacitor

replay-live lacks tags data

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

Hey, I have a stream type task that looks similar to:
```
stream
|from()
.database('db')
.measurement('measurement')
.where(lambda: someCondition)
.groupBy('m1', 'm2', 'm3', 'm4')
|window()
.period(5m)
.every(1m)
|where(lambda: "p50" > threshold)
|count('p50')
.as('count')
|alert()
.id('SOME_STATIC_NAME/{{ index .Tags "m4"}}/{{index .Tags "m3"}}')
.message('{{ .ID }} ...')
.crit(lambda: "count" > 4)
.stateChangesOnly(5m)
.slack()
```
when defined and enabled normally on live data, outputs data to slack in expected format:
```
SOME_STATIC_NAME/m4_tag_value/m3_tag_value ...
```

But, for faster feedback loop I wanted to test it using `replay-live` feature of kapacitor with query
```
kapacitor replay-live query -task task_id -query 'SELECT * FROM "db"."default"."measurement" WHERE time > now() - 10m'
```
Messages are sent to slack as expected, but tag placeholders are not replaced with actual data:
```
SOME_STATIC_NAME// ...
```

versions:
* cli on mac: `Kapacitor v1.1.1 (git: d1e0173df2b9f44c64b7bbf1a120a1bdb3ef683e)` installed with Homebrew
* server on linux: `Kapacitor 1.1.1 (git: master d1e0173df2b9f44c64b7bbf1a120a1bdb3ef683e)` installed from `.deb` package

Contributor guide

Open the contributing guide

Research direction

Start with the `kapacitor replay-live` entry point and reproduce the task using the query and stream definition in the issue. Trace how replayed points reach the alert and Slack message, focusing on whether tag data is preserved. Done means the `{{ index .Tags "m4" }}` and `{{ index .Tags "m3" }}` placeholders produce the corresponding tag values during replay-live.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
stream-processing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.