# Multiple processors with same name - add\_tags

**URL:** <https://discuss.elastic.co/t/multiple-processors-with-same-name-add-tags/184060>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 3, 2019, 9:32pm UTC](https://discuss.elastic.co/t/multiple-processors-with-same-name-add-tags/184060 "2019-06-03T21:32:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jepe](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@jepe](https://discuss.elastic.co/u/jepe)\
**Post date:** [June 3, 2019, 9:32pm UTC](https://discuss.elastic.co/t/multiple-processors-with-same-name-add-tags/184060/1 "2019-06-03T21:32:16Z")

</div>

Hello,  
is it possible to create configuration with multiple processors, using same processor name, but different conditions?

I`d like to add tags for specific log files, like all \*.log files must be tagged as "log" but all \*.out files, as "out", same time - access.log I would like to tagg as "access".

Tried to add multiple processors in `filebeat.yml`:

```auto
processors:
- add_tags:
   when:
      contains:
         log.file.path: ".log"
   tags: ["log"]

processors:
- add_tags:
   when:
      contains:
         log.file.path: ".out"
   tags: ["out"]

processors:
- add_tags:
   when:
      contains:
         log.file.path: "access.log"
   tags: ["access"]

```

Unfortunately, looks like only last processor works.

Is it possible to add more than one add\_tags processor in global config?

---

<div class="post-metadata">

**Author:** ![martinr\_ubi](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@martinr\_ubi](https://discuss.elastic.co/u/martinr_ubi)\
**Post date:** [June 4, 2019, 4:34am UTC](https://discuss.elastic.co/t/multiple-processors-with-same-name-add-tags/184060/2 "2019-06-04T04:34:19Z")

</div>

Hi,

Processors is a list, just list them all in the order you desire them to be executed.  
[https://www.elastic.co/guide/en/beats/filebeat/current/defining-processors.html#defining-processors](https://www.elastic.co/guide/en/beats/filebeat/current/defining-processors.html#defining-processors)

---

<div class="post-metadata">

**Author:** ![jepe](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@jepe](https://discuss.elastic.co/u/jepe)\
**Post date:** [June 4, 2019, 8:16pm UTC](https://discuss.elastic.co/t/multiple-processors-with-same-name-add-tags/184060/3 "2019-06-04T20:16:27Z")

</div>

Thank you,  
I realized that my config is incorrect, based on docs, it must be

```auto
processors:
- add_tags:
   when:
      contains:
         log.file.path: ".log"
   tags: ["log"]
- add_tags:
   when:
      contains:
         log.file.path: ".out"
   tags: ["out"]

```

---

<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:** [July 2, 2019, 8:16pm UTC](https://discuss.elastic.co/t/multiple-processors-with-same-name-add-tags/184060/4 "2019-07-02T20:16:34Z")

</div>

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