logstash.conf 根據不同地址創建索引


input {
http {
host => "0.0.0.0"
port => 9700
type => "from_ys"
}
}
input {
http {
host => "0.0.0.0"
port => 9600
type => "from_sc"
}
}

output{
if [type] == "from_ys"{
elasticsearch {
hosts => ["192.168.123.1:9200"]
index => "logstash-test-%{+YYYY.MM.dd}"
flush_size => 100
}
}

if [type] == "from_sc"{
elasticsearch {
hosts => ["192.168.122.1:9200"]
index => "logstash-test-pro-%{+YYYY.MM.dd}"
flush_size => 100
}
}
}

 


免責聲明!

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



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