Last active
August 29, 2015 14:21
-
-
Save markwalkom/f47a30e37cd402f2dc5d to your computer and use it in GitHub Desktop.
Export from ES to a json file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
elasticsearch { | |
hosts => [ "HOSTNAME_HERE" ] | |
port => "9200" | |
index => "INDEXNAME_HERE" | |
size => 500 | |
scroll => "5m" | |
} | |
} | |
output { | |
file { | |
path => "/path/to/output-file.json" | |
codec => "json" | |
} | |
} | |
# As a single input line for Logstash, eg: logstash -e .... | |
input { elasticsearch { hosts => [ "HOSTNAME_HERE" ] port => "9200" index => "INDEXNAME_HERE" size => 500 scroll => "5m" } } output { file { path => "/path/to/output-file.json" codec => "json"} } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment