logstash迁移es数据

input {
 elasticsearch {
   hosts => ["instance:9200"]
   user => "elastic"
   index => "*,-.monitoring*,-.security*,-.kibana*"
   password => "123456"
   docinfo => true
   ssl => true
   #证书路径
   ca_file => "/app/taishi/elasticsearch/ca/ca.crt"
 }
}
filter {
}
output {
 elasticsearch {
  hosts => ["https://1.1.1.1:9200"]
  user => "elastic"
  password => "123456"
  index => "%{[@metadata][_index]}"
  ssl => true
  #证书路径
  cacert => "/app/taishi/elasticsearch/ca2/ca.crt"
  document_type => "%{[@metadata][_type]}"
  document_id => "%{[@metadata][_id]}"
 }

}

  

posted @ 2022-02-17 17:12  舒然  阅读(175)  评论(0)    收藏  举报