I need to have different entries in logstash and depending on the input source to apply a given output. For example this is my setup:
input {
jmx {
path => "/config-dir/jmx"
polling_frequency => 10
type => "jmx"
}
beats {
codec => json {
charset => "UTF-8"
}
port => 5044
type => "beats"
}
}
output {
stdout {
codec => rubydebug
}
if [type] == "jmx" {
elasticsearch {
hosts => ["elasticsearch:9200"]
}
}
if [type] == "beats" {
elasticsearch {
hosts => ["elasticsearch:9200"]
manage_template => false
index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
document_type => "%{[@metadata][type]}"
}
}
}
however when I use the index Kibana topbeats I do not recognize any input. Any idea what could be the problem?