I have this logstash config but beats documents get created with index "log-2016.10.12" that is the document_tpye instead of filebeat-xxx. Any idea on how i can set the index name to filebeat and snmptrap index to snmptrap?
input {
beats {
type => "filebeat"
port => 5044
}
snmptrap {
type => "snmptrap"
community => "public"
port => 8162
}
}
### Add your filters / logstash plugins configuration here
filter {
if "_grokparsefailure" in [tags] {
drop {}
}
}
output {
elasticsearch {
hosts => "elasticsearch:9200"
user => "elastic"
index => "%{type}-%{+YYYY.MM.dd}"
}
}