influxdata / influxdata/kapacitor

Group by custom eval field/tag and a list

Open
#2,370 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

Hello!

I'm building a task template and trying to group by a custom eval field/tag as well as whatever group is passed into the template. For example, my yaml file would have a group like this:
```
...
group:
type: list
value:
- type: string
value: 'category_1'
...
```

and I would want to be able to group like so:

```
...
|groupBy('compVal',group)
...
```

Compval is a value that is being made using eval.

I understand that I could manually configure it within the yaml file, but it would be a pain for everyone using this template to remember to do that.

Is there any way to accomplish this? I have not seen any documentation on combining lists.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the groupBy('compVal', group) template expression and how custom eval fields and list-valued groups are represented in Kapacitor. Determine whether combining the evaluated value with the template's group requires a documented capability or broader grouping design; done means the requested grouping works for the shown YAML and expression, with coverage for list combinations.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
data
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.