# Get told when your site goes down, set up from your AI assistant

Source: https://clickruntime.com/use-cases/uptime-monitoring

> Ask your assistant to watch your site or API. ClickRuntime requests it on a schedule, checks the status code, response time and a word that should be on the page, and alerts you once when it's down and once when it's back.

## Can ChatGPT or Claude tell me when my website is down?

Not on their own: they only check when you ask, and they can't message you at night. With ClickRuntime connected, your assistant sets up a check that requests your site every 5 minutes or slower, counts failures in a row and alerts you in Slack or by email, then again when it recovers.

### Why the assistant can't do this on its own

- Downtime happens when nobody is chatting. A check has to run on a timer, outside the conversation.
- One failed request is often a blip. Alerting after two or three failures in a row needs a count kept between checks, which a chat doesn't have.
- “It's back up” needs to know it was down. The automation's state holds that.

## Set it up from your AI assistant

Prompt to copy:

> Create a ClickRuntime automation: every 5 minutes, check https://app.example.com/health. It's down if the status isn't 200, it takes longer than 5 seconds, or the body doesn't contain "ok". After 2 failures in a row post to #ops in Slack, and post again when it's back up with how long it was down.

1. **Connect ClickRuntime to your assistant.** Add ClickRuntime as a connector (MCP server) in ChatGPT, Claude, Cursor or another MCP client, using https://clickruntime.com/api/mcp. You sign in with Google or email; there is no API key to copy. This is done once per assistant.
2. **Paste the prompt.** Start a new chat and paste: “Create a ClickRuntime automation: every 5 minutes, check https://app.example.com/health. It's down if the status isn't 200, it takes longer than 5 seconds, or the body doesn't contain "ok". After 2 failures in a row post to #ops in Slack, and post again when it's back up with how long it was down.” Change the details (times, channels, addresses) to yours.
3. **Read the draft.** The assistant restates what will happen, asks for anything missing, such as your timezone or which channel to post to, and saves a draft automation. A draft never runs on its own, so nothing happens until you agree.
4. **Connect accounts and save keys.** Alerts to Slack use the workspace notifications Slack: the assistant gives you a link to connect it once in the ClickRuntime dashboard and asks for the channel. Email alerts need nothing. If the endpoint needs a token, save it as a secret in the ClickRuntime dashboard.
5. **Test it.** The assistant runs it once and shows the status and response time. To see an alert without real downtime, it can run a test against a URL that returns an error, then switch back.
6. **Turn it on.** The assistant tells you what will run, when, and which services it will contact, then asks your permission to turn it on. From then on it runs on ClickRuntime's servers, and you can close the chat.
7. **Check it in the ClickRuntime dashboard.** Each run shows the status code and time, for example “200 in 182 ms”. Failed checks show the reason. State holds the failure count and when the outage started. The run history doubles as a simple uptime log.

Connector setup for each assistant: https://clickruntime.com/assistants

## What the assistant writes

`uptime_check.py`

```python
import time
from datetime import datetime, timezone
from clickruntime import on_trigger, state, notify, http, log

URL = "https://app.example.com/health"
MUST_CONTAIN = "ok"
TIMEOUT = 5
FAILS_BEFORE_ALERT = 2
CHANNEL = "#ops"

def check():
    start = time.monotonic()
    try:
        r = http.get(URL, timeout=TIMEOUT)
    except Exception as e:
        return False, f"no response ({type(e).__name__})", None
    ms = int((time.monotonic() - start) * 1000)
    if r.status_code != 200:
        return False, f"status {r.status_code}", ms
    if MUST_CONTAIN not in r.text:
        return False, f"'{MUST_CONTAIN}' missing from body", ms
    return True, f"200 in {ms} ms", ms

@on_trigger
def run(event):
    ok, detail, ms = check()
    fails = state.get("fails") or 0
    down_since = state.get("down_since")
    now = datetime.now(timezone.utc)

    if ok:
        if down_since:
            minutes = int((now - datetime.fromisoformat(down_since)).total_seconds() // 60)
            notify.slack(f"{URL} is back up after about {minutes} min ({detail}).", channel=CHANNEL)
        state.set("fails", 0)
        state.set("down_since", None)
        state.increment_metric("checks_ok", ttl_days=30, bucket="day")
        return {"summary": detail}

    fails += 1
    state.set("fails", fails)
    state.increment_metric("checks_failed", ttl_days=30, bucket="day")
    log.warning("Check failed", {"detail": detail, "fails": fails})
    if fails == FAILS_BEFORE_ALERT:
        state.set("down_since", now.isoformat())
        notify.slack(f"{URL} looks down: {detail}. Failed {fails} checks in a row.", channel=CHANNEL)
    return {"summary": f"failed: {detail}", "fails": fails}
```

- Status, time and body are checked with plain code, so no AI tokens are used.
- The failure counter in state stops one-off blips from alerting anyone.
- One alert per outage and one when it recovers, because the outage start is kept in state.
- Daily counters of good and failed checks let a weekly report work out uptime later.

## A schedule, not a trigger link

Use a schedule, every 5 minutes for production sites. That is the shortest interval, so this suits knowing within about 10 minutes rather than second-by-second paging.

Each check is one run: every 5 minutes is about 8,640 runs a month, so pick a plan that covers it, or check every 30 minutes for a side project.

## Limits

- The shortest interval is every 5 minutes, and checks come from ClickRuntime's servers in one region.
- Only HTTPS on port 443. Ping, other TCP ports and plain HTTP aren't available.
- This is a check you own and can extend, not a status page or on-call rota. For paging with escalation, have the automation call your incident tool's API.

## Troubleshooting

### It alerts but the site looks fine to me.

Read the failed run's reason. A response slower than the timeout, or a firewall that blocks cloud addresses, are common. Ask your assistant to raise the timeout, or allow the request on your side.

### Alerts don't reach Slack.

The run fails with a notify error when the notifications Slack isn't connected or no channel was set. Connect it in the ClickRuntime dashboard and invite the app to the channel.

### Can it check several URLs?

Yes, one automation can loop over a list and keep a counter for each. Ask your assistant to add them.

## Related

- [Slack automations](https://clickruntime.com/apps/slack)
- [Discord automations](https://clickruntime.com/apps/discord)
- [Microsoft Teams automations](https://clickruntime.com/apps/microsoft-teams)
- [ssl-certificate-expiry](https://clickruntime.com/templates/ssl-certificate-expiry)
- [Monitoring and alerts](https://clickruntime.com/use-cases/monitoring-and-alerts)
- [Run code every hour](https://clickruntime.com/use-cases/run-code-every-hour)
- [Website change alerts](https://clickruntime.com/use-cases/website-change-alerts)
- [cron-job.org alternative](https://clickruntime.com/alternatives/cron-job-org)
- [GitHub Actions cron alternative](https://clickruntime.com/alternatives/github-actions-cron)
- [Docs: state](https://clickruntime.com/docs/state)
- [Docs: troubleshooting](https://clickruntime.com/docs/troubleshooting)

## Extend it: what you can add next

The first version is rarely the last. Because the automation is a Python script with memory, AI and any API available, you grow it by asking your assistant for the change. Each change is a new version, and a failed deploy never replaces the working one.

- **Check your site, API and checkout page in one automation** (Multi-step logic)
  Prompt: "Change my uptime check so it also checks https://api.example.com/health and https://example.com/checkout, and names which one failed."
- **A weekly uptime report from the daily counters** (Memory between runs)
  Prompt: "Add to my uptime check: every Monday at 9, email me last week's uptime percentage per day."
- **Open an incident in Linear when the site stays down** (Any app or API)
  Prompt: "Add to my uptime check: if it's still down after 15 minutes, create an urgent issue in Linear with the failure details."
- **Text the on-call phone through Twilio** (Any app or API)
  Prompt: "Change my uptime check so it also sends an SMS through Twilio to our on-call number when the site goes down."
- **Explain the error page in plain words in the alert** (Built-in AI)
  Prompt: "Change my uptime check so when it gets an error page, it adds a one-line plain explanation of the error to the alert."
- **Let deploys mute the alerts for a few minutes** (Trigger links)
  Prompt: "Add a trigger link to my uptime check that our deploy script calls to mute alerts for 10 minutes during a deploy."
- **Check SSL expiry once a day alongside uptime** (Schedules)
  Prompt: "Add to my uptime check: once a day at 8, check the SSL certificate and alert #ops if it expires within 14 days."

## Questions

### Can ChatGPT monitor my website's uptime?

Not on its own, because it acts only while you chat. With ClickRuntime connected, ChatGPT sets up a check that runs every 5 minutes or slower and alerts you in Slack or by email.

### Can Claude check if my site is down?

Yes, through ClickRuntime. Claude writes the check and turns it on; it keeps running on ClickRuntime's servers after the chat is closed.

### How quickly will I know?

With checks every 5 minutes and an alert after two failures, usually within about 10 minutes.

### Does it replace a dedicated uptime service?

For a few sites and simple rules, often yes. Dedicated services check from many regions and run status pages; ClickRuntime is for checks with your own logic, such as reading a page's content or opening a ticket.

### How many runs does it use?

One per check: about 8,640 a month at every 5 minutes, or 1,440 at every 30 minutes.

### What can I add later?

More URLs, an incident ticket, SMS, a weekly uptime report or an SSL check. See the Extend it list.
