# Multiple input and output in logstash

**URL:** https://discuss.elastic.co/t/multiple-input-and-output-in-logstash/45948
**Category:** Logstash
**Created:** [March 31, 2016, 1:51pm UTC](https://discuss.elastic.co/t/multiple-input-and-output-in-logstash/45948 "2016-03-31T13:51:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![daguero](https://avatars.discourse-cdn.com/v4/letter/d/b5e925/32.png) [@daguero](https://discuss.elastic.co/u/daguero)
#### Post date: [March 31, 2016, 1:51pm UTC](https://discuss.elastic.co/t/multiple-input-and-output-in-logstash/45948/1 "2016-03-31T13:51:04Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [April 2, 2016, 6:57pm UTC](https://discuss.elastic.co/t/multiple-input-and-output-in-logstash/45948/2 "2016-04-02T18:57:55Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 5:04am UTC](https://discuss.elastic.co/t/multiple-input-and-output-in-logstash/45948/3 "2017-07-06T05:04:14Z")

</div>


