Create uptime alert when specific service is down

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"]
    schedule: '@every 10s'
    timeouts: 1m

  • type: http
    id: website_monitor
    name: Website application status
    tags: ["webAdmin"]
    urls: ["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.

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

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

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

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.

1 Like

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