使用logstash迁移ES1.x数据到ES7.x
tar -zxvf logstash-7.2.1.tar.gz
mv logstash-7.2.1 /usr/local/logstash
vi es-es.conf
---------------------------------------------------------------------
input {
elasticsearch {
hosts => ["172.16.24.221:19200", "172.16.24.222:19200", "172.16.24.223:19200"]
user => "admin"
password => "123456"
index => "*"
codec => "json"
docinfo => true
}
}
output {
stdout {
codec => rubydebug
}
elasticsearch {
hosts => ["172.16.24.153:19200", "172.16.24.154:19200", "172.16.24.155:19200"]
user => "elastic"
password => "12345678"
document_type => "%{[@metadata][_type]}"
document_id => "%{[@metadata][_id]}"
index => "%{[@metadata][_index]}"
}
}
./bin/logstash -f config/es-es.conf