influxdata / influxdata/kapacitor

Does .field or similar exist for InfluxDBOutNode?

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

In the InfluxDBOutNode documentation I didn't find the property .field .
The idea would be, as the property .tag, to add additional field to the InfluxDBOut, with code like
```
node.field(key string, value)
```
Is there a reason why it doesn't exist?

I found a way to do it through the evalNode:
```
|eval(lambda: "crit"/1.0, lambda: "value"/1.0)
.as('crit','data')
.keep('crit','data')
|where(lambda: "id" != '')
|influxDBOut()
.database('univrabat')
.retentionPolicy('autogen')
.measurement('alert')
.tag('_uuid', uuid)
```
This code will write on influxDB the two fields 'crit' and 'data':
```
name: alert
fieldKey fieldType
-------- ---------
crit integer
data float

```
But it doesn't look like the normal way to do it...

Thanks!

Contributor guide

Open the contributing guide

Research direction

Start with the InfluxDBOutNode documentation and the influxDBOut() entry point shown in the example; compare its existing .tag behavior with the requested .field(key string, value). Confirm whether direct field support is absent and define the expected output for the crit and data fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.