top of page

Use Logstash To Copy Elasticsearch Index

  • taolius
  • Aug 10, 2017
  • 1 min read

input { # We read from the "old" index elasticsearch { hosts => [ "172.16.5.151:9200" ] index => "my_test" user => "admin" password => "FixStream" size => 500 scroll => "5m" docinfo => true } }

filter { mutate { remove_field => [ "@version", "@timestamp" ] } }

output { # We write to the "new" index elasticsearch { hosts => ["172.16.2.75:9200"] user => "admin" password => "FixStream" action => "index" index => "my_test" document_type => "%{[@metadata][_type]}" document_id => "%{[@metadata][_id]}" } # We print dots to see it in action stdout { codec => "dots" } }


 
 
 

Comments


© 2023 by BI World. Proudly created with Wix.com

  • Facebook Basic Black
  • Twitter Basic Black
  • YouTube Basic Black
bottom of page