zoulou
October 14, 2022, 8:25pm
1
When using the parser processor, the measurement name get changed to “parser”.
It happens in either merge=“override” case or in the new metric.
I would expect to keep the original measurement name, is there something that I am missing here ?
example with original and parsed metric in JSON :
water,topic=sprinkler/arena/frontend value="{\"Pnetwork\":2.271,\"Pprefilter\":0.047,\"Psprinkler\":-0.003,\"tank_level\":28.389,\"output\":0,\"error\":0,\"well_pump_enabled\":1,\"fill_tank
_enabled\":1,\"wp_starts\":1051}" 1665778985960330563
parser well_pump_enabled=1,error=0,fill_tank_enabled=1,tank_level=28.389,Pprefilter=0.047,Psprinkler=-0.003,wp_starts=1051,Pnetwork=2.271,output=0 1665778985960668040
[[processors.parser]]
parse_fields = ["value"]
drop_original = false
data_format="json"
jpowers
October 26, 2022, 11:35pm
2
I saw someone on the community slack report this same thing. If you could report an issue with a basic example that we can use to reproduce this issue I would greatly appreciate it!
A bug report about this problem can be found here:
opened 06:33AM - 27 Oct 22 UTC
closed 02:23PM - 08 Dec 22 UTC
bug
plugin/parser
plugin/processor
### Relevant telegraf.conf
```toml
[[inputs.file]]
files = ["/test/test.t… xt"]
data_format = "value"
data_type = "string"
[[processors.parser]]
namepass = ["file"]
parse_fields = ["value"]
drop_original = false
merge = "override"
data_format = "value"
data_type = "float"
[[outputs.file]]
files = ["stdout"]
```
### Logs from Telegraf
```text
Telegraf 1.23.4:
file value=7.2 1664873970000000000
Telegraf 1.24.2:
parser value=7.2 1664892267000000000
```
### Steps to reproduce
Use the [[processors.parser]] as shown in the example above or as reported in one of links given in the "Additional info" block.
### Expected behavior
like Telegraf 1.23.4 does: keep the measurement name of the input.
### Actual behavior
Measurement name is changed to 'parser'.
The field is dropped from the original measurement, even with setting `drop_original = false`.
### Additional info
The same issue get's talked about behind these 3 links:
* https://community.influxdata.com/t/parser-processor-change-measurement-name-to-parser/26984
* https://community.influxdata.com/t/single-mqtt-consumer-for-int-float-string/27137
* https://influxcommunity.slack.com/archives/CH99HUH8V/p1666794045416509
I'm a new user of InfluxDB & Telegraf, and have no idea how to actually switch to an older Telegraf version. I've copied the sample and it's output from this issue:
https://github.com/influxdata/telegraf/issues/11921
1 Like