# Can i have in logstash 2 different inputs with 2 different ports

**URL:** https://discuss.elastic.co/t/can-i-have-in-logstash-2-different-inputs-with-2-different-ports/225809
**Category:** Logstash
**Created:** [March 31, 2020, 7:46am UTC](https://discuss.elastic.co/t/can-i-have-in-logstash-2-different-inputs-with-2-different-ports/225809 "2020-03-31T07:46:38Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Alexandros888](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Alexandros888](https://discuss.elastic.co/u/Alexandros888)
#### Post date: [March 31, 2020, 7:46am UTC](https://discuss.elastic.co/t/can-i-have-in-logstash-2-different-inputs-with-2-different-ports/225809/1 "2020-03-31T07:46:38Z")

</div>

Hello can i have in logstash input section 2 different inputs with 2 different ports ?

input {  
gelf {  
port\_udp =\> 5041  
use\_udp =\> true  
},

http{  
port\_http =\> 5043

}  
}

In the case that the answer is yes can i also have more inputs ?

Thank you

---

<div class="post-metadata">

### Author: ![Robo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robo/32/38295_2.png) [@Robo](https://discuss.elastic.co/u/Robo)
#### Post date: [March 31, 2020, 8:11am UTC](https://discuss.elastic.co/t/can-i-have-in-logstash-2-different-inputs-with-2-different-ports/225809/2 "2020-03-31T08:11:38Z")

</div>

yes, it's working...

see  
[https://discuss.elastic.co/t/logstash-with-multiple-inputs/79326](https://discuss.elastic.co/t/logstash-with-multiple-inputs/79326)  
or  
[https://discuss.elastic.co/t/logstash-multiple-tcp-inputs-with-different-ports/61911](https://discuss.elastic.co/t/logstash-multiple-tcp-inputs-with-different-ports/61911)

---

<div class="post-metadata">

### Author: ![Alexandros888](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Alexandros888](https://discuss.elastic.co/u/Alexandros888)
#### Post date: [March 31, 2020, 8:29am UTC](https://discuss.elastic.co/t/can-i-have-in-logstash-2-different-inputs-with-2-different-ports/225809/3 "2020-03-31T08:29:29Z")

</div>

Hello,

Thanks BUT...

The first link that you provided does not provide an answer because one input is from beat agent i want to check sources like tcp,udp, gelf etc..  
The second link has a case where the same input is in both cases tcp with different ports.

The case that i want to clarify is if i can have 2 different protocol type inputs (gelf, http) with 2 different ports as i show in my example.

---

<div class="post-metadata">

### Author: ![Robo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robo/32/38295_2.png) [@Robo](https://discuss.elastic.co/u/Robo)
#### Post date: [March 31, 2020, 9:02am UTC](https://discuss.elastic.co/t/can-i-have-in-logstash-2-different-inputs-with-2-different-ports/225809/4 "2020-03-31T09:02:46Z")

</div>

> [@Alexandros888](#):
>
> that i want to clarify is if i can have 2 different protocol type inputs (gelf, htt

we are using tcp port (5044)and http port (5045) in one pipeline and it's working without issues.

---

<div class="post-metadata">

### Author: ![Alexandros888](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Alexandros888](https://discuss.elastic.co/u/Alexandros888)
#### Post date: [March 31, 2020, 9:07am UTC](https://discuss.elastic.co/t/can-i-have-in-logstash-2-different-inputs-with-2-different-ports/225809/5 "2020-03-31T09:07:51Z")

</div>

Thank you very much 🙂

---

<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: [April 28, 2020, 9:11am UTC](https://discuss.elastic.co/t/can-i-have-in-logstash-2-different-inputs-with-2-different-ports/225809/6 "2020-04-28T09:11:55Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
