# How can I skip recording an event with these conditions

**URL:** <https://discuss.elastic.co/t/how-can-i-skip-recording-an-event-with-these-conditions/270422>\
**Category:** Beats\
**Tags:** winlogbeat\
**Created:** [April 16, 2021, 8:41pm UTC](https://discuss.elastic.co/t/how-can-i-skip-recording-an-event-with-these-conditions/270422 "2021-04-16T20:41:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jftuga](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@jftuga](https://discuss.elastic.co/u/jftuga)\
**Post date:** [April 16, 2021, 8:41pm UTC](https://discuss.elastic.co/t/how-can-i-skip-recording-an-event-with-these-conditions/270422/1 "2021-04-16T20:41:11Z")

</div>

I am using `winlogbeat`. How can I exclude events that meet the following criteria:

- event\_id = 4670
- only when the "related": "user" value ends with a $
- (alternatively) the "user": "name" ends with a $

Values that end in a $ correspond to machine accounts and I am not interested logging these.

Thanks,  
-John

---

<div class="post-metadata">

**Author:** ![Jason\_Slater](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jason_slater/32/63484_2.png) [@Jason\_Slater](https://discuss.elastic.co/u/Jason_Slater)\
**Post date:** [April 17, 2021, 6:29am UTC](https://discuss.elastic.co/t/how-can-i-skip-recording-an-event-with-these-conditions/270422/2 "2021-04-17T06:29:07Z")

</div>

Hi John,

You can add filtering in your winlogbeat.yml file -- see winlogbeat.reference.yml for examples

See this page for documentation on conditions:

> **[Define processors | Filebeat Reference \[7.12\] | Elastic](https://www.elastic.co/guide/en/beats/filebeat/current/defining-processors.html#conditions)**

Specifically, you would need to add something like this to your winlogbeat.yml file:

```
  processors:
      - drop_event:
          when:
            and:
              - equals:
                  event_id: 4670
              - or
                  - regexp:
                      related.user: "\\$$"
                  - regexp:
                      user.name: "\\$$"
```

---

<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:** [May 15, 2021, 8:30am UTC](https://discuss.elastic.co/t/how-can-i-skip-recording-an-event-with-these-conditions/270422/3 "2021-05-15T08:30:03Z")

</div>

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