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-2025 CODEPRJ.COM