# Custom EQL Query where one event happened and another didnt

**URL:** <https://discuss.elastic.co/t/custom-eql-query-where-one-event-happened-and-another-didnt/296524>\
**Category:** SIEM\
**Tags:** eql-elastic-query-language\
**Created:** [February 7, 2022, 9:29pm UTC](https://discuss.elastic.co/t/custom-eql-query-where-one-event-happened-and-another-didnt/296524 "2022-02-07T21:29:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![willemdh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/willemdh/32/16922_2.png) [@willemdh](https://discuss.elastic.co/u/willemdh)\
**Post date:** [February 7, 2022, 9:29pm UTC](https://discuss.elastic.co/t/custom-eql-query-where-one-event-happened-and-another-didnt/296524/1 "2022-02-07T21:29:46Z")

</div>

Hello,

Just wondering if it's possible to write an EQL query where event x happenend and event y did **not** happen for the same host after 0-2 minutes?

Use case =\> Detecting messing with Eventlog Service

Event ID 1100 is logged when the Eventlog service shuts down. I would like to throw an alert when the Eventlog service does not generate a 7036 with param1="EventLog" and param2="running" 0 - 2 minutes after the 1100.

Willem

---

<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 7, 2022, 9:29pm UTC](https://discuss.elastic.co/t/custom-eql-query-where-one-event-happened-and-another-didnt/296524/2 "2022-03-07T21:29:48Z")

</div>

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