Output in random order

Hi All,

My config:
[[inputs.logparser]]

file(s) to tail:

files = ["/data/mnt2/haproxy-2018-04-17_12_13.log"]
from_beginning = false
name_override = “test_metric”

For parsing logstash-style “grok” patterns:

[inputs.logparser.grok]
patterns = ["%{SYSLOGTIMESTAMP:syslog_timestamp} %{IP:client_ip}"]
[[outputs.file]]

Files to write to, “stdout” is a specially handled file.

files = [“stdout”]

How do I ensure that I always have the following output order please?
syslog_timestamp, client_ip

currently, output order seams random. 50% I had: client_ip, syslog_timestamp

Please shed some light.
Thanks a lot in advance

Normally the fields are output in an unsorted order for performance reasons, but in Telegraf 1.6 you can use the new influx_sort_fields option to sort the fields in ascending lexical order. Keep in mind it will be a little bit slower so only use it when you need it.

Thanks a lot and shall try 1.6 soon