Good afternoon community,
I want to create a .csv file with certain data fields.
Initially I used logstash with the following code
input {
elasticsearch {
hosts => "localhost:9200"
index => "teste21"
query => '{"query":{"match_all":{}}}'
#size => 2
}
}
output {
csv {
fields => ["_id","text","_type"]
path => "....."
}
}
but the result Is not as expected, something of the genre "% {hosts}% {message}}, after a search I read that version 5.x did not allowthat and had to use 2.x, but with this version I can not even generate the file.
Then I installed the dataformat 5.3.0 plugin and after confirming that it was installed, I used the command curl -o /tmp/data.csv -XGET "localhost: 9200 / index / type / _data? Format = csv & source =
But it gives an error and the elasticsearch is closed.
Someone can help me, regards.
Lbr1