# Try to take only log from on application

**URL:** <https://discuss.elastic.co/t/try-to-take-only-log-from-on-application/232256>\
**Category:** Beats\
**Tags:** winlogbeat\
**Created:** [May 12, 2020, 3:27pm UTC](https://discuss.elastic.co/t/try-to-take-only-log-from-on-application/232256 "2020-05-12T15:27:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roms](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roms/32/63867_2.png) [@Roms](https://discuss.elastic.co/u/Roms)\
**Post date:** [May 12, 2020, 3:27pm UTC](https://discuss.elastic.co/t/try-to-take-only-log-from-on-application/232256/1 "2020-05-12T15:27:44Z")

</div>

Hello everyone,

I can catch every log from the computer but I just want the log from one application. I try to make that with the processors on Winlogbeat.

1. It's is possible ?
2. Did I have to do that with a filter on Logstash ?

Here it's what I catch with the logbeat.

Actualy It's what I have from the cmd line:

```auto
Exiting: error initializing processors: failed to initialize condition: missing or invalid condition

```

And here is my Winlogbeat processors

```auto
    processors:
    - include_fields:
        when:
          winlog.event_data.ProcessName: 'C:\Program Files (x86)\Microsoft Dynamics NAV\110\RoleTailored Client\Microsoft.Dynamics.Nav.Client.exe'
        fields: [message, winlog.event_data.ProcessName, winlog.event_data.SubjectUserName]

```

Kind of regards.  
Romain

PS: I'm sorry for my english skill

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [May 12, 2020, 9:05pm UTC](https://discuss.elastic.co/t/try-to-take-only-log-from-on-application/232256/2 "2020-05-12T21:05:53Z")

</div>

Hey @Roms,

One thing you can do is to filter out all events you are not interested in, for example with something like this:

```auto
processors:
  - drop_event:
      when:
        equals.winlog.event_data.ProcessName: 'C:\Program Files (x86)\Microsoft Dynamics NAV\110\RoleTailored Client\Microsoft.Dynamics.Nav.Client.exe'

```

---

<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:** [May 13, 2020, 10:18am UTC](https://discuss.elastic.co/t/try-to-take-only-log-from-on-application/232256/3 "2020-05-13T10:18:20Z")

</div>

Hello,

I'm using this configuration on the winlogbeat agent to send specific events (4624 and 4625) generated by an application (Azure AD Connect PTA agent).  
I'm using a drop\_event processor.

This will drop every collected events that are not sent by my application.

```
winlogbeat.event_logs:
  - name: Security
    ignore_older: 24h
    event_id: 4624,4625

processors:
- drop_event.when.not.equals.winlog.event_data.ProcessName: 'C:\Program Files\Microsoft Azure AD Connect Authentication Agent\AzureADConnectAuthenticationAgentService.exe'

```

Regards,

---

<div class="post-metadata">

**Author:** ![Roms](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roms/32/63867_2.png) [@Roms](https://discuss.elastic.co/u/Roms)\
**Post date:** [May 13, 2020, 11:44am UTC](https://discuss.elastic.co/t/try-to-take-only-log-from-on-application/232256/4 "2020-05-13T11:44:24Z")

</div>

Hey everyone,

Thank you for your answers.  
I have already tried @jsoriano solution.  
I'll see if your proposal could also work with my problem. (event\_id and the ignore\_older)  
I managed to get what I wanted in Kiabana by using KQL and isolating the logs. Which seems to be enough for what we're doing.

My only fear is that I'll end up with a log overflow.

I thank you for your answer the topic can be closed.

---

<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 10, 2020, 11:44am UTC](https://discuss.elastic.co/t/try-to-take-only-log-from-on-application/232256/5 "2020-06-10T11:44:31Z")

</div>

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