# How to use multiple operators in EQL (Event query language)?

**URL:** <https://discuss.elastic.co/t/how-to-use-multiple-operators-in-eql-event-query-language/313852>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [September 7, 2022, 7:09am UTC](https://discuss.elastic.co/t/how-to-use-multiple-operators-in-eql-event-query-language/313852 "2022-09-07T07:09:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sirineb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sirineb/32/100274_2.png) [@sirineb](https://discuss.elastic.co/u/sirineb)\
**Post date:** [September 7, 2022, 7:09am UTC](https://discuss.elastic.co/t/how-to-use-multiple-operators-in-eql-event-query-language/313852/1 "2022-09-07T07:09:31Z")

</div>

Hi,

I was wondering how to use multiple operators using EQL (Event Query Language).

My EQL query is :

```auto
any where office_hours == false and winlog.event_id == 4624 or winlog.event_id == 4625

```

I would like to add parenthesis so it would lead to :

```auto
office_hours == false AND (winlog.event_id == 4624 or winlog.event_id == 4625)

```

because currently it gives me logs when office\_hours == true also so I suppose that without any parenthesis it interprets the query as :

```auto
(office_hours == false and winlog.event_id == 4624) OR (winlog.event_id == 4625)

```

But the parenthesis are not taken into account so I don't know what to do, I tried with (, { and [but none of these work. I am aware of the [syntax reference](https://www.elastic.co/guide/en/elasticsearch/reference/8.3/eql-syntax.html) but there's no example in it. I also tried by adding a second time `office_hours == false` after the "OR" but it doesn't work either.

Is the only solution to make two distincts alerts ? One with 4624 and another with 4625.

Thanks !

---

<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:** [October 5, 2022, 7:10am UTC](https://discuss.elastic.co/t/how-to-use-multiple-operators-in-eql-event-query-language/313852/2 "2022-10-05T07:10:30Z")

</div>

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