Logstash (5.2.0)
logstash-input-elasticsearch (4.0.0)
logstash-output-csv (3.0.2)
logstash-input-elasticsearch is used to take data from a particular index and query results 10+ fields. Below output should print only 1 field as given but it prints all fields to the file
output {
csv {
fields => [ "fieldname" ]
csv_options => {"col_sep" => "," "row_sep" => "\r\n"}
path => "/tmp/csv-export.csv"
}
}