influxdata / influxdata/telegraf
processors.rename - weird behaviour in regards to "tags"-option
- Dominant language
- Go
- Stars
- 17.8k
- Forks
- 5.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 161
Description
### Relevant telegraf.conf with `rename` processor
```toml
[[inputs.mock]] # this input is always the same
metric_name = "mock"
[[inputs.mock.constant]]
name = "constant"
value = 123
[[processors.rename]]
namepass = ["mock"]
tags = { "test" = "doesnt_work" } # <-------- doesn't work but no error
```
### Logs from Telegraf
```text
$ telegraf -config tags.conf -test -test-wait 5 -debug
...
> mock,host=myhost constant=123i 1755612972000000000
```
The `tags` option seems to exist, though, as I get an error if I try to use an option that doesn't exist:
```toml
[[inputs.mock]] # this input is always the same
metric_name = "mock"
[[inputs.mock.constant]]
name = "constant"
value = 123
[[processors.rename]]
namepass = ["mock"]
thisdoesntexist = { "test" = "doesnt_work" } # <------------ error!
```
output:
```
$ telegraf -config tags.conf -test -test-wait 5 -debug
2025-08-19T14:20:39Z I! Loading config: tags.conf
2025-08-19T14:20:39Z E! loading config file tags.conf failed: plugin processors.rename: line 8: configuration specified the fields ["thisdoesntexist"], but they were not used; this is either a typo or this config option does not exist in this version
````
The `override`-processor behaves as expected, though:
```toml
[[inputs.mock]] # this input is always the same
metric_name = "mock"
[[inputs.mock.constant]]
name = "constant"
value = 123
[[processors.override]]
namepass = ["mock"]
tags = { "test" = "works" }
```
output:
```
$ telegraf -config tags.conf -test -test-wait 5 -debug
...
> mock,host=myhost,test=works constant=123i 1755613379000000000
```
### System info
Telegraf 1.34.4 (git: HEAD@e7ce1e1e), RHEL 9
### Steps to reproduce
Use "tags" option with `rename`-processor.
### Expected behavior
Expect that the tags are added to the metric
### Actual behavior
Observe that the tags aren't added to the metric
Contributor guide
Assessment
This issue has not been assessed yet.