-
Couldn't load subscription status.
- Fork 5.7k
Description
Use Case
In NetFlow (v5/v9/IPFIX), the protocol and tcp_flags fields are defined as unsigned 8-bit integers. However, Telegraf currently converts these fields into human-readable strings. While this improves readability, it is less efficient for large-scale storage and complicates compatibility with tools and pipelines that rely on the original integer representation.
For example, when migrating flow data processing from goflow2 to Telegraf, logic expecting numeric values fails due to the type mismatch.
Expected behavior
Introduce a configuration toggle (e.g., raw_protocol_fields = true) that disables automatic string conversion, allowing Telegraf to store the raw integer values for protocol and tcp_flags.
Actual behavior
Telegraf currently converts these fields into string representations by default. There is no configuration option to preserve the original numeric format.
Additional info
https://github.com/influxdata/telegraf/blob/master/plugins/inputs/netflow/type_conversion.go#L30
https://github.com/influxdata/telegraf/blob/master/plugins/inputs/netflow/type_conversion.go#L222