Elastic to csv using logstash

I use the following conf file to import data from elasticsearch to csv using logstash...
input {
elasticsearch {
hosts => "localhost:9200"
index => "croma"
query => '
{"query":
{
"match_phrase" : {
"search_data.full_text_boosted": "laptop bag "
}
}
}'
}
}
output {
csv {
fields => ["full_text_boosted","scores"]
path => "/root/sam/csv-export.csv"
}
}

I also installed following logstash plugin...
logstash-input-elasticsearch
logstash-output-csv

But it giving the following error...
WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console

Any body can tell me where I am wrong?
Thanks

Hi,
What does your directory structure look like? Where is logstash bin and config on your file system?

Thanks for replying...it's working with match but not working with match_phrase...any reason...

That's a warning, not an error, and you can safely ignore this.

Thanks warkolm for your kind suggestion.

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