Hi , I want to create a two outputs filters in logstash , that depends on the "type" field sent from filebeat:
filebeat:
prospectors:
-
paths:
- /var/log/app.log
input_type: log
document_type: app
paths:
- /var/log/stuff.log
input_type: log
document_type: stuff
I have in logstash two filterss:
filterapp.conf
filter {
if[type] == "app" {
.......
}
filterfoo.conf
filter {
if[type] == "stuff " {
.......
}
output.conf
output {
elasticsearch {
hosts => ["localhost:9200"]
sniffing => true
manage_template => false
index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
document_type => "%{[@metadata][type]}"
}
}
I would like to create 2 outputs with 2 indexes
app-*
stuff-*
How Can I tell to output {} to send the logs to app index or stuff index?
