# How to create a watcher alert if a specific service goes down on a system which is monitored using metricbeat agent?

**URL:** <https://discuss.elastic.co/t/how-to-create-a-watcher-alert-if-a-specific-service-goes-down-on-a-system-which-is-monitored-using-metricbeat-agent/278464>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [July 12, 2021, 7:19pm UTC](https://discuss.elastic.co/t/how-to-create-a-watcher-alert-if-a-specific-service-goes-down-on-a-system-which-is-monitored-using-metricbeat-agent/278464 "2021-07-12T19:19:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patr123](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@Patr123](https://discuss.elastic.co/u/Patr123)\
**Post date:** [July 12, 2021, 7:19pm UTC](https://discuss.elastic.co/t/how-to-create-a-watcher-alert-if-a-specific-service-goes-down-on-a-system-which-is-monitored-using-metricbeat-agent/278464/1 "2021-07-12T19:19:34Z")

</div>

I have few systems on which I have metricbeat v7.12.1 installed. How can I configure the watcher alert to send me an email if the service called testservice.exe goes down on server A?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [July 12, 2021, 11:40pm UTC](https://discuss.elastic.co/t/how-to-create-a-watcher-alert-if-a-specific-service-goes-down-on-a-system-which-is-monitored-using-metricbeat-agent/278464/2 "2021-07-12T23:40:17Z")

</div>

Assuming you mean the new Kibana Alerting Framework.

You can test to see if there are no metrics reported with that `process.name`

You could also check the process state if you wanted.

Alert Type : Metric Threshold

 ![Screen Shot 2021-07-12 at 4.37.06 PM](https://us1.discourse-cdn.com/elastic/original/3X/8/8/88d0a0e8b7ea2155179151105279aa4153d83b0e.png)  
 ![Screen Shot 2021-07-12 at 4.37.21 PM](https://us1.discourse-cdn.com/elastic/original/3X/9/5/9588992c70d1002d03aecb96a2d239989dff287e.png)

---

<div class="post-metadata">

**Author:** ![Patr123](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@Patr123](https://discuss.elastic.co/u/Patr123)\
**Post date:** [July 13, 2021, 8:54pm UTC](https://discuss.elastic.co/t/how-to-create-a-watcher-alert-if-a-specific-service-goes-down-on-a-system-which-is-monitored-using-metricbeat-agent/278464/3 "2021-07-13T20:54:27Z")

</div>

Thank you but this filter is for processes and not for services. Can I add a filter for services like this?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [July 13, 2021, 8:58pm UTC](https://discuss.elastic.co/t/how-to-create-a-watcher-alert-if-a-specific-service-goes-down-on-a-system-which-is-monitored-using-metricbeat-agent/278464/4 "2021-07-13T20:58:13Z")

</div>

You can filter on any term in metricbeat ... services are processes are they not?

Can you give an example?

Can you see the testservice.exe reported in metricbeat data?

Take a look at the exported fields

> **[System process metricset | Metricbeat Reference \[7.12\] | Elastic](https://www.elastic.co/guide/en/beats/metricbeat/7.12/metricbeat-metricset-system-process.html)**

---

<div class="post-metadata">

**Author:** ![Patr123](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@Patr123](https://discuss.elastic.co/u/Patr123)\
**Post date:** [July 15, 2021, 2:34pm UTC](https://discuss.elastic.co/t/how-to-create-a-watcher-alert-if-a-specific-service-goes-down-on-a-system-which-is-monitored-using-metricbeat-agent/278464/5 "2021-07-15T14:34:31Z")

</div>

Yes that is correct. I was not monitoring the testservice.exe in my system.yml file. Once I did that change I was able to see it in the metrics.  
Thank you so much Stephen.

---

<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:** [August 12, 2021, 2:35pm UTC](https://discuss.elastic.co/t/how-to-create-a-watcher-alert-if-a-specific-service-goes-down-on-a-system-which-is-monitored-using-metricbeat-agent/278464/6 "2021-08-12T14:35:11Z")

</div>

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