# Drop source value - Problem with filter

**URL:** <https://discuss.elastic.co/t/drop-source-value-problem-with-filter/63221>\
**Category:** Logstash\
**Created:** [October 17, 2016, 7:07pm UTC](https://discuss.elastic.co/t/drop-source-value-problem-with-filter/63221 "2016-10-17T19:07:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sukesh2016](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sukesh2016](https://discuss.elastic.co/u/sukesh2016)\
**Post date:** [October 17, 2016, 7:07pm UTC](https://discuss.elastic.co/t/drop-source-value-problem-with-filter/63221/1 "2016-10-17T19:07:47Z")

</div>

I am new to ES and logstash. I am getting some unwanted logs with source : "horizon-error" in Kibana. I want to drop those messages. Have tried below option, but no luck. Would really appreciate any help.

if "horizon" in [source] { drop{} } }

This is how my logstash.conf looks like.

input {  
syslog { port =\> 5544 codec =\> json type =\> "infra" } }  
filter {  
if "horizon" in [source] { drop{} } }  
output {  
elasticsearch { hosts =\> ["localhost:9200"] index =\> "infra-%{cloudname}-%{+YYYY.MM.dd}" } }

---

<div class="post-metadata">

**Author:** ![sukesh2016](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sukesh2016](https://discuss.elastic.co/u/sukesh2016)\
**Post date:** [October 17, 2016, 8:49pm UTC](https://discuss.elastic.co/t/drop-source-value-problem-with-filter/63221/2 "2016-10-17T20:49:14Z")

</div>

Never mind. I figured out after spending quite some time, a silly mistake. My field was "@source" , but I was trying to put condition on "source".

if "horizon" in [@source] { drop{} } } ----- Worked.

---

<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:33am UTC](https://discuss.elastic.co/t/drop-source-value-problem-with-filter/63221/3 "2017-07-06T04:33:53Z")

</div>

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


