Question:
What I already have:
input { http { host => "0.0.0.0" port => "5000" } } output { elasticsearch { hosts => "elasticsearch:9200" } }
What I need:
input { http { host => "0.0.0.0" port => "5000" } http { host => "0.0.0.0" port => "7070" } }
You can set a type for each input and use that type to generate the index name:
input {
http {
host => "0.0.0.0"
port => "5000"
type => "A"
}
http {
host => "0.0.0.0"
port => "5001"
type => "B"
}
}
Using the type may suffice, as you can filter the records using it. But you may also need to store each type of record in a different index since each type may use a different type for the same field. This causes a mapping conflict.
output {
elasticsearch {
hosts => "elasticsearch:9200"
index => "%{[type]}-%{+YYYY.MM.dd}"
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With