# Logstash filter no longer works after upgrading

**URL:** <https://discuss.elastic.co/t/logstash-filter-no-longer-works-after-upgrading/131899>\
**Category:** Logstash\
**Created:** [May 15, 2018, 9:49am UTC](https://discuss.elastic.co/t/logstash-filter-no-longer-works-after-upgrading/131899 "2018-05-15T09:49:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kernelpanic](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@kernelpanic](https://discuss.elastic.co/u/kernelpanic)\
**Post date:** [May 15, 2018, 9:49am UTC](https://discuss.elastic.co/t/logstash-filter-no-longer-works-after-upgrading/131899/1 "2018-05-15T09:49:52Z")

</div>

Hello all, when I was using Logstash 5.3.0 I had the following filter which worked without issue:

```
if [event_id] == 257 and [computer_name] == "EXCHANGE-SERVER-1.DOMAIN.COM" or [computer_name] == "EXCHANGE-SERVER-2.DOMAIN.COM" or [computer_name] == "EXCHANGE-SERVER-3.DOMAIN.COM" {
   drop {}
  }

```

However since upgrading to the latest version of Logstash I've noticed that I only get events from [EXCHANGE-SERVER-1.DOMAIN.COM](http://EXCHANGE-SERVER-1.DOMAIN.COM) - no events come through for the other servers regardless of the event ID.

Can any tell me why this used to work but no longer does?

Thanks.

---

<div class="post-metadata">

**Author:** ![paz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paz/32/28003_2.png) [@paz](https://discuss.elastic.co/u/paz)\
**Post date:** [May 15, 2018, 9:55am UTC](https://discuss.elastic.co/t/logstash-filter-no-longer-works-after-upgrading/131899/2 "2018-05-15T09:55:17Z")

</div>

Could be something about how Logstash handles conditional grouping. That said, you can remove the multiple ORs by converting it to

```auto
if [event_id] == 257 and [computer_name] in ["EXCHANGE-SERVER-1.DOMAIN.COM", "EXCHANGE-SERVER-2.DOMAIN.COM", "EXCHANGE-SERVER-3.DOMAIN.COM"] {
   drop {}
}
```

---

<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:** [June 12, 2018, 9:55am UTC](https://discuss.elastic.co/t/logstash-filter-no-longer-works-after-upgrading/131899/3 "2018-06-12T09:55:25Z")

</div>

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