# Alert on Process failures only if existing

**URL:** <https://discuss.elastic.co/t/alert-on-process-failures-only-if-existing/307172>\
**Category:** Metrics\
**Created:** [June 14, 2022, 2:10pm UTC](https://discuss.elastic.co/t/alert-on-process-failures-only-if-existing/307172 "2022-06-14T14:10:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeffo](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@jeffo](https://discuss.elastic.co/u/jeffo)\
**Post date:** [June 14, 2022, 2:10pm UTC](https://discuss.elastic.co/t/alert-on-process-failures-only-if-existing/307172/1 "2022-06-14T14:10:50Z")

</div>

I'm relatively new to elastic, and I have a plethora of systems (windows) that all have unique monitoring requirements for processes with some overlap. We are running version 7.16.2. I can make alerts on a condition WHEN document count IS BELOW 1 filtered on (KQL) process.name: "x.exe" and host.name: "x"

What I am wondering is if there is a way to only alert if there was a document count before (say in the past 48-72 hours) but failed in the past minute?

We also have some processes that require multiple copies of the process to be running. Is there a way to alert if the total number of process X is at a value and alert if it deviates from that value?

It seems I can't stack timing conditions in the alert. Being able to do this would save me from making hundreds of unique and overlapping alerts.

Thanks!

---

<div class="post-metadata">

**Author:** ![TiagoQueiroz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tiagoqueiroz/32/107061_2.png) [@TiagoQueiroz](https://discuss.elastic.co/u/TiagoQueiroz)\
**Post date:** [June 15, 2022, 10:36am UTC](https://discuss.elastic.co/t/alert-on-process-failures-only-if-existing/307172/2 "2022-06-15T10:36:14Z")

</div>

Hi @jeffo,

have you looked at [EQL search](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/eql.html)? It seems to fit your requirements to match time-series events.

---

<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 13, 2022, 10:36am UTC](https://discuss.elastic.co/t/alert-on-process-failures-only-if-existing/307172/3 "2022-07-13T10:36:28Z")

</div>

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