# Create uptime alert when specific service is down

**URL:** https://discuss.elastic.co/t/create-uptime-alert-when-specific-service-is-down/244844
**Category:** Synthetics
**Tags:** elastic-stack-alerting
**Created:** [August 13, 2020, 9:41am UTC](https://discuss.elastic.co/t/create-uptime-alert-when-specific-service-is-down/244844 "2020-08-13T09:41:15Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![devwinner](https://avatars.discourse-cdn.com/v4/letter/d/a4c791/32.png) [@devwinner](https://discuss.elastic.co/u/devwinner)
#### Post date: [August 13, 2020, 9:41am UTC](https://discuss.elastic.co/t/create-uptime-alert-when-specific-service-is-down/244844/1 "2020-08-13T09:41:15Z")

</div>

Hello everybody. I have started using Heartbeat few time now to create monitors for managing our web sites. I have created two monitors :

- type: http  
id: prometheus\_monitor  
name: Prometheus monitor status  
urls: ["[http://IP:32322](http://IP:32322)"]  
schedule: '@every 10s'  
timeouts: 1m

- type: http  
id: website\_monitor  
name: Website application status  
tags: ["webAdmin"]  
urls: ["[https://website.domain.net](https://website.domain.net)"]  
schedule: '@every 10s'  
timeouts: 1m

Everything is working fine. Now i have created two alerts for my monitors. For the first alert, i have used this condition:

MATCHING MONITORS ARE DOWN \> 5 times  
WITHIN last 5 minutes  
USING port 32322

For the second alert, i have used this condition:  
MATCHING MONITORS ARE DOWN \> 5 times  
WITHIN last 5 minutes  
USING tag webAdmin

The first alert is working fine. But the second alert is not working at all. When i go to page Manage Alert for the second alert, i see No items found.

Please help me know what i'm doing wrong.  
Can someone tell me how to create uptime alert when specific service is down using Uptime.

---

<div class="post-metadata">

### Author: ![jkambic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jkambic/32/53306_2.png) [@jkambic](https://discuss.elastic.co/u/jkambic)
#### Post date: [August 13, 2020, 3:04pm UTC](https://discuss.elastic.co/t/create-uptime-alert-when-specific-service-is-down/244844/2 "2020-08-13T15:04:12Z")

</div>

Hi @devwinner, thanks for posting your question.

> But the second alert is not working at all. When i go to page Manage Alert for the second alert, i see No items found.

If the service you're monitoring is `up` then there should be no items here. The items shown in the management page are for active alert instances, so the only time there should be items is if the service you're monitoring is `down`. Were you expecting the service to be failing your uptime check?

> Can someone tell me how to create uptime alert when specific service is down using Uptime.

If your goal is to create one alert per service, you can use the search bar in the alert creation flyout to check against a specific `monitor.id` or `monitor.name`. Saving an alert with that filter applied, you'll effectively only get alerted when that monitor is down for your threshold criteria. See animation below.

![Aug-13-2020 11-00-09](https://us1.discourse-cdn.com/elastic/original/3X/f/d/fdb9edae9824dfe6c060b31eeb022879974e36c2.gif)

If you have any follow-up questions don't hesitate to post a reply.

---

<div class="post-metadata">

### Author: ![devwinner](https://avatars.discourse-cdn.com/v4/letter/d/a4c791/32.png) [@devwinner](https://discuss.elastic.co/u/devwinner)
#### Post date: [August 14, 2020, 3:09pm UTC](https://discuss.elastic.co/t/create-uptime-alert-when-specific-service-is-down/244844/3 "2020-08-14T15:09:19Z")

</div>

Thanks you very much @jkambic for your reply. I will try it

---

<div class="post-metadata">

### Author: ![devwinner](https://avatars.discourse-cdn.com/v4/letter/d/a4c791/32.png) [@devwinner](https://discuss.elastic.co/u/devwinner)
#### Post date: [August 14, 2020, 3:31pm UTC](https://discuss.elastic.co/t/create-uptime-alert-when-specific-service-is-down/244844/4 "2020-08-14T15:31:38Z")

</div>

I have tried with the tag like i did it before. I have stopped the service for the second alert and i receive an email. Thanks @jkambic for your help. It works

I will try the second method later.

---

<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: [September 7, 2020, 3:31pm UTC](https://discuss.elastic.co/t/create-uptime-alert-when-specific-service-is-down/244844/5 "2020-09-07T15:31:50Z")

</div>

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