logstash從kafka取數據輸出到es


input {
  kafka {
    bootstrap_servers => ["192.168.13.139:9092"]
    client_id => "test"
    group_id => "test"
    auto_offset_reset => "latest"
    consumer_threads => 5
    decorate_events => true
    topics => ["hbtest"]
    type => "bhy"
    codec => "json"   
    }
}
filter {
  grok {
    match => {"message"=>"%{COMBINEDAPACHELOG}"}
  }
}
output {
  elasticsearch {
    hosts => ["192.168.13.139:9200"]
    index => "%{app_name}-%{+YYYY.MM.dd}"
    }
}

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM