# IIS Filebeat module exclude\_lines not working

**URL:** <https://discuss.elastic.co/t/iis-filebeat-module-exclude-lines-not-working/174961>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 2, 2019, 10:11am UTC](https://discuss.elastic.co/t/iis-filebeat-module-exclude-lines-not-working/174961 "2019-04-02T10:11:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darren\_Mansell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/darren_mansell/32/43297_2.png) [@Darren\_Mansell](https://discuss.elastic.co/u/Darren_Mansell)\
**Post date:** [April 2, 2019, 10:11am UTC](https://discuss.elastic.co/t/iis-filebeat-module-exclude-lines-not-working/174961/1 "2019-04-02T10:11:28Z")

</div>

Hi. This is a simple install of filebeat 6.6.1 on windows.

I've enabled the IIS module and set the location so it doesn't pick up the FTP logs and have grok failures. I also need it to ignore certain lines which contain the user-agent of the load-balancer constantly checking IIS. My iis.yml file is:

```
 - module: iis
  # Access logs
  access:
    enabled: true

    # Set custom paths for the log files. If left empty,
    # Filebeat will choose the paths depending on your OS.
    var.paths: ["C:/inetpub/logs/LogFiles/W3*/*.log"]
    exclude_lines: ['ALBX']

  # Error logs
  error:
    enabled: true

    # Set custom paths for the log files. If left empty,
    # Filebeat will choose the paths depending on your OS.
    #var.paths:

```

A line I need to ignore is:

2019-04-01 00:00:03 1.2.3.4 GET / - 80 - 1.2.3.4 ALBX/4.0 - 200 0 0 0

Is this supported?

Thanks

---

<div class="post-metadata">

**Author:** ![Michal\_Pristas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michal_pristas/32/46639_2.png) [@Michal\_Pristas](https://discuss.elastic.co/u/Michal_Pristas)\
**Post date:** [April 2, 2019, 11:59am UTC](https://discuss.elastic.co/t/iis-filebeat-module-exclude-lines-not-working/174961/2 "2019-04-02T11:59:48Z")

</div>

Hey @Darren_Mansell

please try to take a look at processors, specifically [Drop event](https://www.elastic.co/guide/en/beats/filebeat/current/drop-event.html)

you can combine it with a [regex](https://www.elastic.co/guide/en/beats/filebeat/current/defining-processors.html#condition-regexp) to fulfil a condition and then events will be dropped

---

<div class="post-metadata">

**Author:** ![Darren\_Mansell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/darren_mansell/32/43297_2.png) [@Darren\_Mansell](https://discuss.elastic.co/u/Darren_Mansell)\
**Post date:** [April 2, 2019, 12:12pm UTC](https://discuss.elastic.co/t/iis-filebeat-module-exclude-lines-not-working/174961/3 "2019-04-02T12:12:40Z")

</div>

@Michal_Pristas thanks this looks perfect.

Where would I put the processor for the IIS module? Under the module?

```
- module: iis
  # Access logs
  access:
    enabled: true
    var.paths: ["C:/inetpub/logs/LogFiles/W3*/*.log"]

  # Error logs
  error:
    enabled: true
    #var.paths:
    
  processors:
   - drop_event:
       when:
          regexp:
             iis.access.user_agent.original: "ALBX.*"
```

---

<div class="post-metadata">

**Author:** ![Michal\_Pristas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michal_pristas/32/46639_2.png) [@Michal\_Pristas](https://discuss.elastic.co/u/Michal_Pristas)\
**Post date:** [April 2, 2019, 12:16pm UTC](https://discuss.elastic.co/t/iis-filebeat-module-exclude-lines-not-working/174961/4 "2019-04-02T12:16:49Z")

</div>

please refer to this section [where are processors valid](https://www.elastic.co/guide/en/beats/filebeat/6.7/defining-processors.html#where-valid)

also you can also check `filebeat.reference.yml` if in doubt.

generally what you wrote is correct except the indentation of the processor. make sure it starts at the beginning of the line without any whitespaces before it.

---

<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:** [April 30, 2019, 12:16pm UTC](https://discuss.elastic.co/t/iis-filebeat-module-exclude-lines-not-working/174961/5 "2019-04-30T12:16:55Z")

</div>

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