How to export elasticsearch raw data to csv

kumar picture kumar · Apr 18, 2018 · Viewed 7.2k times · Source

I recently started using elasticsearch database and kibana 5.6.9. I was able to export the visualization data to csv using kibana, but not the raw data.

Am in search of a method, where I should be able to export the raw data from Elasticsearch to a CSV file. Can I get some help regarding this. Thanks in advance.

Answer

cloudvyzor picture cloudvyzor · Mar 11, 2020

This is the possible way to export data from ElasticSearch to CSV:

  1. Make a snapshot (if doesn’t exist yet)
  2. Use esbackupexporter to convert the snapshot to zipped JSON files.
  3. Use lodpad to search (filter) the events you really need from these zipped JSONs.
  4. Then export to csv from logpad.