# Winlogbeat filtering problem

**URL:** <https://discuss.elastic.co/t/winlogbeat-filtering-problem/248297>\
**Category:** Beats\
**Tags:** winlogbeat\
**Created:** [September 11, 2020, 10:03am UTC](https://discuss.elastic.co/t/winlogbeat-filtering-problem/248297 "2020-09-11T10:03:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpeyton](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@jpeyton](https://discuss.elastic.co/u/jpeyton)\
**Post date:** [September 11, 2020, 10:03am UTC](https://discuss.elastic.co/t/winlogbeat-filtering-problem/248297/1 "2020-09-11T10:03:17Z")

</div>

Hi,

What I want to do achieve is to send all events from the Security log except event id 4672 and 4627. This works well, but what I can't find out how to do, is make a rule that send event id 4627 only if it does not have a field called SubjectUserSid equal to S-1-0-0. My attempt:

`winlogbeat.event_logs:`  
` - name: Security`  
` ignore_older: 24h`  
` processors:`  
` - drop_event.when.or:`  
` - equals.winlog.event_id: 4672`  
` - equals.winlog.event_id: 4627`  
` - and:`  
` - equals.winlog.event_data.SubjectUserSid: 'S-1-0-0'`

My attempt still filter out all security events with id 4627.

I would really appreciate if someone could help me with this one.

---

<div class="post-metadata">

**Author:** ![mazoutte](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mazoutte/32/120188_2.png) [@mazoutte](https://discuss.elastic.co/u/mazoutte)\
**Post date:** [September 14, 2020, 7:28am UTC](https://discuss.elastic.co/t/winlogbeat-filtering-problem/248297/2 "2020-09-14T07:28:14Z")

</div>

Hello,

You can try something like this :

```
processors:
- drop_event.when.or:
  - equals.winlog.event_id: 4672
  - and:
    - equals.winlog.event_id: 4627
    - equals.winlog.event_data.SubjectUserSid: 'S-1-0-0'
```

---

<div class="post-metadata">

**Author:** ![jpeyton](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@jpeyton](https://discuss.elastic.co/u/jpeyton)\
**Post date:** [September 14, 2020, 8:30am UTC](https://discuss.elastic.co/t/winlogbeat-filtering-problem/248297/3 "2020-09-14T08:30:20Z")

</div>

That did the trick! 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:** [October 12, 2020, 10:30am UTC](https://discuss.elastic.co/t/winlogbeat-filtering-problem/248297/4 "2020-10-12T10:30:30Z")

</div>

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