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"
}
}elasticsearch

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

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

相關文章
相關標籤/搜索