Csv output failing in logstash 5.1.2

Facing issues with csv output in logstash 5.1.2
output {
csv {
fields => ["time", "level", "fun", "data", "thread"]
path => "/data/outputcsv.csv"
}
}
generates output as sequence of strings - %{host} %{message}%{host} %{message}%{host} %{message}
While the file output generates proper output
file {
path => "/data/output"
}
Any help?

I had the same issue, but the file output works as an alternative:

file {
    codec => line { format => %{field1},"%{field2}"}
    path => "/path/to/data_export.csv"
}

It's a known bug and there's an open issue for it: https://github.com/logstash-plugins/logstash-output-csv/issues/10

As a workaround you may:

  • downgrade to Logstash 2.x until this gets resolved,
  • use the file output instead
  • modify the plugin's code according to the github discussion...

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.