# How to distinguish between two input data sources?

**URL:** <https://discuss.elastic.co/t/how-to-distinguish-between-two-input-data-sources/122209>\
**Category:** Logstash\
**Created:** [March 2, 2018, 8:12am UTC](https://discuss.elastic.co/t/how-to-distinguish-between-two-input-data-sources/122209 "2018-03-02T08:12:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![linsie](https://avatars.discourse-cdn.com/v4/letter/l/da6949/32.png) [@linsie](https://discuss.elastic.co/u/linsie)\
**Post date:** [March 2, 2018, 8:12am UTC](https://discuss.elastic.co/t/how-to-distinguish-between-two-input-data-sources/122209/1 "2018-03-02T08:12:21Z")

</div>

Logstash version : 5.0.1

How to distinguish between two input data sources from different computers or systems, the input is used with tcp and the same port, like this :

input {  
tcp {  
port =\> 514  
}  
}

for example :  
I will send the different computers or systems' syslog to the same 514 port, at this time, how can I distinguish the data source ,so i can process the different data easily ???

Thx.

---

<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:** [March 2, 2018, 8:24am UTC](https://discuss.elastic.co/t/how-to-distinguish-between-two-input-data-sources/122209/2 "2018-03-02T08:24:10Z")

</div>

The tcp input will add a field with the IP address of the connecting client.

Also, if it's syslog data the payload itself should identify the hostname of the machine.

---

<div class="post-metadata">

**Author:** ![linsie](https://avatars.discourse-cdn.com/v4/letter/l/da6949/32.png) [@linsie](https://discuss.elastic.co/u/linsie)\
**Post date:** [March 26, 2018, 3:07am UTC](https://discuss.elastic.co/t/how-to-distinguish-between-two-input-data-sources/122209/3 "2018-03-26T03:07:46Z")

</div>

Got it ! Thank you !

---

<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 23, 2018, 3:08am UTC](https://discuss.elastic.co/t/how-to-distinguish-between-two-input-data-sources/122209/4 "2018-04-23T03:08:22Z")

</div>

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