使用logstash迁移es集群数据


安装logstash服务。

logstash主目录下:vim es-es.conf

input {
elasticsearch {
hosts => ["10.128.120.171", "10.128.120.172", "10.128.120.173", "10.128.120.179", "10.128.120.235"]
# user => "*******"
# password => "*********"
index => "*"
size => 1000
scroll => "1m"
}
}
filter {
mutate {
remove_field => ["@timestamp", "@version"]
}
}
output {
elasticsearch {
hosts => ["10.13.133.121", "10.13.133.122", "10.13.133.123", "10.13.133.124", "10.13.133.125"]
# user => "********"
# password => "**********"
index => "%{[@metadata][_index]}"
}
}

启动:logstash -f es-es.conf


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM