Skip to content

Instantly share code, notes, and snippets.

@varunmehta
Forked from markwalkom/logstash.conf
Created August 8, 2016 15:45
Show Gist options
  • Save varunmehta/0d7b7f90720e0ce7c55ea1868bc69bb0 to your computer and use it in GitHub Desktop.
Save varunmehta/0d7b7f90720e0ce7c55ea1868bc69bb0 to your computer and use it in GitHub Desktop.
Reindexing Elasticsearch with Logstash 2.0
input {
elasticsearch {
hosts => [ "HOSTNAME_HERE" ]
port => "9200"
index => "INDEXNAME_HERE"
size => 1000
scroll => "5m"
docinfo => true
scan => true
}
}
output {
elasticsearch {
hosts => [ "HOSTNAME_HERE" ]
index => "%{[@metadata][_index]}"
document_type => "%{[@metadata][_type]}"
document_id => "%{[@metadata][_id]}"
}
stdout {
codec => "dots"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment