Know your site is down before your users do

Know when your site goes down before customers do

What you will receive

Alert: mysite.com is down

just now

Your website is not responding.

URL: https://mysite.com
Status: Connection timeout
Checked at: 2:34 PM

Check status →

How it works

  1. 1Humrun pings your website on your schedule
  2. 2It checks for a successful response (status 200)
  3. 3If the site is down or slow, you get an immediate alert

You configure

https://mysite.com

The URL to monitor

10

How long to wait before considering the site down

View Python code
import requests
import os

SITE_URL = os.environ.get("SITE_URL")
TIMEOUT_SECONDS = int(os.environ.get("TIMEOUT_SECONDS", "10"))

try:
    response = requests.get(SITE_URL, timeout=TIMEOUT_SECONDS, headers={"User-Agent": "Humrun/1.0"})
    if response.status_code == 200:
        print(f"Site is up. Status: {response.status_code}, Time: {response.elapsed.total_seconds():.2f}s")
    else:
        raise Exception(f"Site returned status {response.status_code}")
except requests.exceptions.Timeout:
    raise Exception(f"Site timed out after {TIMEOUT_SECONDS} seconds")
except requests.exceptions.ConnectionError as e:
    raise Exception(f"Could not connect to site: {e}")
Suggested schedule: Every 5 minutesNotifications: When an alert is triggered
Browse more templates