# Different ssyslog source

**URL:** <https://discuss.elastic.co/t/different-ssyslog-source/50843>\
**Category:** Logstash\
**Created:** [May 24, 2016, 1:05pm UTC](https://discuss.elastic.co/t/different-ssyslog-source/50843 "2016-05-24T13:05:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karl\_Trasschaert](https://avatars.discourse-cdn.com/v4/letter/k/f9ae1b/32.png) [@Karl\_Trasschaert](https://discuss.elastic.co/u/Karl_Trasschaert)\
**Post date:** [May 24, 2016, 1:05pm UTC](https://discuss.elastic.co/t/different-ssyslog-source/50843/1 "2016-05-24T13:05:42Z")

</div>

Hi,

How can i apply different filter on different source.

Actually, all my devices send logs to the same port 514 natted to 1514.

i need to apply a different filter for one of the devices, how can i change the type for this device ? or us e a condition to apply this filter ?

thx

---

<div class="post-metadata">

**Author:** ![mourlos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mourlos/32/10788_2.png) [@mourlos](https://discuss.elastic.co/u/mourlos)\
**Post date:** [May 24, 2016, 5:51pm UTC](https://discuss.elastic.co/t/different-ssyslog-source/50843/2 "2016-05-24T17:51:33Z")

</div>

Hi,

It will be easier if you create a filter based on the source if you are talking about just one device.

To be more precise, create a very generic filter that breaks down the main syslog and gives you the host IP/name .  
Then create a new filter based on that field. it will be something like:

`if [host] == "the_host_you_want" { grok {`

Of course grok can be anything else and the field will be named whatever you want.

Hope it helps.

---

<div class="post-metadata">

**Author:** ![Karl\_Trasschaert](https://avatars.discourse-cdn.com/v4/letter/k/f9ae1b/32.png) [@Karl\_Trasschaert](https://discuss.elastic.co/u/Karl_Trasschaert)\
**Post date:** [May 26, 2016, 10:27am UTC](https://discuss.elastic.co/t/different-ssyslog-source/50843/3 "2016-05-26T10:27:13Z")

</div>

it's what i did and it works.

Thx

---

<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, 4:56am UTC](https://discuss.elastic.co/t/different-ssyslog-source/50843/4 "2017-07-06T04:56:06Z")

</div>

Closed on July 6, 2017, 4:56am UTC


