# Add\_fields processor not working

**URL:** <https://discuss.elastic.co/t/add-fields-processor-not-working/194688>\
**Category:** Beats\
**Created:** [August 10, 2019, 3:58am UTC](https://discuss.elastic.co/t/add-fields-processor-not-working/194688 "2019-08-10T03:58:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajhstn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ajhstn/32/24629_2.png) [@ajhstn](https://discuss.elastic.co/u/ajhstn)\
**Post date:** [August 10, 2019, 3:58am UTC](https://discuss.elastic.co/t/add-fields-processor-not-working/194688/1 "2019-08-10T03:58:33Z")

</div>

Hello - can you spot any problem with this processor. when i `.\winlogbeat.exe test config` i get a good `Config OK` as expected, however when events that i feel should match the processor occur, the field is not being added.

Please note NONE of these 4 add fields seem to work. I have other processors above and beneath this code that works fine..

```
    - add_fields:
        when.equals.winlog.event_id: "6005"
        fields:
          winlog.event_data.Info: "Machine starting"
        target: ""
    - add_fields:
        when.equals.winlog.event_id: "6006"
        fields:
          winlog.event_data.Info: "Machine stopping"
        target: ""
    - add_fields:
        when:
          and:
            - equals.winlog.event_id: "1074"
            - equals.winlog.event_data.param5: "restart"
        fields:
          winlog.event_data.Info: "Machine will restart"
        target: ""
    - add_fields:
        when:
          and:
            - equals.winlog.event_id: "1074"
            - equals.winlog.event_data.param5: "power off"
        fields:
          winlog.event_data.Info: "Machine will shutdown"
        target: ""
```

---

<div class="post-metadata">

**Author:** ![ajhstn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ajhstn/32/24629_2.png) [@ajhstn](https://discuss.elastic.co/u/ajhstn)\
**Post date:** [August 10, 2019, 4:33am UTC](https://discuss.elastic.co/t/add-fields-processor-not-working/194688/2 "2019-08-10T04:33:13Z")

</div>

Fixed, i changed strings to the correct data type and it worked, eg `"6005"` should be `6005`, namely a number not a string.

---

<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:** [September 7, 2019, 6:33am UTC](https://discuss.elastic.co/t/add-fields-processor-not-working/194688/3 "2019-09-07T06:33:16Z")

</div>

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