Multiple input and output in logstash

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?

So you have a topbeat-yyyy.mm.dd index but it doesn't look like Topbeat data? What kind of data does it look like? Where does the data from Topbeat end up?