# How to create watcher alert for data or documents are not received on metricbeat or filebeat

**URL:** <https://discuss.elastic.co/t/how-to-create-watcher-alert-for-data-or-documents-are-not-received-on-metricbeat-or-filebeat/214397>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [January 9, 2020, 9:49am UTC](https://discuss.elastic.co/t/how-to-create-watcher-alert-for-data-or-documents-are-not-received-on-metricbeat-or-filebeat/214397 "2020-01-09T09:49:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishnuvardhan](https://avatars.discourse-cdn.com/v4/letter/v/50afbb/32.png) [@vishnuvardhan](https://discuss.elastic.co/u/vishnuvardhan)\
**Post date:** [January 9, 2020, 9:49am UTC](https://discuss.elastic.co/t/how-to-create-watcher-alert-for-data-or-documents-are-not-received-on-metricbeat-or-filebeat/214397/1 "2020-01-09T09:49:30Z")

</div>

Hi team,

i am already enable the feature watcher email alert on my elasticsearch ,i need to know how to create watcher email alert, when no data received from metricbeat of my kibana discover . how to do please help me

thanks in advance !

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [January 9, 2020, 3:22pm UTC](https://discuss.elastic.co/t/how-to-create-watcher-alert-for-data-or-documents-are-not-received-on-metricbeat-or-filebeat/214397/2 "2020-01-09T15:22:45Z")

</div>

How about a watch with a query, that queries for the last `n` minutes, and if you have less than `y` search hits in your condition, trigger an email?

---

<div class="post-metadata">

**Author:** ![vishnuvardhan](https://avatars.discourse-cdn.com/v4/letter/v/50afbb/32.png) [@vishnuvardhan](https://discuss.elastic.co/u/vishnuvardhan)\
**Post date:** [January 10, 2020, 2:10am UTC](https://discuss.elastic.co/t/how-to-create-watcher-alert-for-data-or-documents-are-not-received-on-metricbeat-or-filebeat/214397/3 "2020-01-10T02:10:50Z")

</div>

Hi Spinscale,  
yes .. i am new to this concepts .. same query needed, "that queries for the last `n` minutes, and if you have less than `y` search hits" how to write that query .  
please help me

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [January 10, 2020, 12:30pm UTC](https://discuss.elastic.co/t/how-to-create-watcher-alert-for-data-or-documents-are-not-received-on-metricbeat-or-filebeat/214397/4 "2020-01-10T12:30:25Z")

</div>

you might want to take a look at the [alerting examples](https://github.com/elastic/examples/tree/master/Alerting/Sample%20Watches) and get some inspiration how to write a query and use a condition

---

<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:** [February 7, 2020, 12:30pm UTC](https://discuss.elastic.co/t/how-to-create-watcher-alert-for-data-or-documents-are-not-received-on-metricbeat-or-filebeat/214397/5 "2020-02-07T12:30:30Z")

</div>

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