Include field names before docs (data)


In order to export docs from Elasticsearch, I'm trying to utilize Csv output plugin | Logstash Reference for that, however I stumble upon small issue..

Is there a way to add field names as first line (before data)?


Not that I can see. The code does this.

csv_values = {|name| get_value(name, event)}

map returns an array of field values, so by the time to_csv is called the association with the names has been lost.

It would be possible to modify the output to have an option to add a header row and this has been requested, but no such option currently exists.

(system) #3

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