# Processors syntax

**URL:** <https://discuss.elastic.co/t/processors-syntax/170491>\
**Category:** Beats\
**Tags:** auditbeat\
**Created:** [March 1, 2019, 11:42am UTC](https://discuss.elastic.co/t/processors-syntax/170491 "2019-03-01T11:42:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lukass](https://avatars.discourse-cdn.com/v4/letter/l/65b543/32.png) [@Lukass](https://discuss.elastic.co/u/Lukass)\
**Post date:** [March 1, 2019, 11:42am UTC](https://discuss.elastic.co/t/processors-syntax/170491/1 "2019-03-01T11:42:19Z")

</div>

Hi,

I'm having problems with syntax on creating processor for dropping message in auditbeat.  
My field process.args has value ["-bash"] if I configure processor:

```auto
processors:
    - drop_event:
           when:
             contains:
               process.args: "["-bash"]"

```

Auditbeat wont start. If I remove "" around value, auditbeat starts but rule isn't matching.

Any help would be much appreciated.  
Thanks  
Luka

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [March 1, 2019, 5:10pm UTC](https://discuss.elastic.co/t/processors-syntax/170491/2 "2019-03-01T17:10:07Z")

</div>

The `contains` condition only matches if the field value is a string. This is a limitation of the implementation in Beats. It would be nice if the condition also work on string arrays which is what the `process.args` is. So currently this will never match.

I'm not sure what you were trying to match. But if you were trying to specify a string literal of `["-bash"]` then in YAML you would need to put single-quotes around the literal like `'["-bash']'`.

Would like to open an enhancement request in the Github repo for making the `contains` condition work on string array? The behavior that I would expect is that each argument would be checked to see if it contained the given string.

---

<div class="post-metadata">

**Author:** ![Lukass](https://avatars.discourse-cdn.com/v4/letter/l/65b543/32.png) [@Lukass](https://discuss.elastic.co/u/Lukass)\
**Post date:** [March 4, 2019, 8:57am UTC](https://discuss.elastic.co/t/processors-syntax/170491/3 "2019-03-04T08:57:39Z")

</div>

Hi Andrew,

Thanks for response and clarification of beats processors implementations.

Yes, I would like to match string literal of ["-bash"], valid syntax in YAML is '["-bash"]' as you said.  
I would like to drop all unneeded messages on auditbeat site and not to forward them to elasticsearch.

For my point of view I also expect that auditbeat match all strings in contains condition regardless if there are square brackets in string. I can open enhancement request in the Github repo.

Thanks and best regards,  
Luka

---

<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:** [March 25, 2019, 8:57am UTC](https://discuss.elastic.co/t/processors-syntax/170491/4 "2019-03-25T08:57:39Z")

</div>

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