Uptime monitoring tools usually charge based on how many sites you're checking and how often. For one or two personal projects, that's a lot of money for something that's really just "ping this URL, tell me if it's down."
Here's a version that costs nothing and takes under half an hour to set up, using Python and GitHub Actions.
What it actually needs to do
Check if a site responds, on a schedule. If it doesn't respond, or the response code isn't in the 200 range, send an alert somewhere you'll actually see it — Discord, Slack, or Telegram all work fine with a webhook.
That's the entire feature set. No dashboard, no historical uptime percentage, no status page. Just a check and an alert.
The script
The core of it is a short Python script: send a request to the URL, check the status code, and if it fails, send a message to a webhook URL for whichever chat platform you're using. Discord, Slack, and Telegram all accept a simple POST request with a JSON body, so the alerting part is a few lines regardless of which one you pick.
The schedule
This is where GitHub Actions does the actual work. A schedule trigger with a cron expression runs the script automatically — every 5, 10, or 15 minutes, depending on how tight you want the check interval. No server, no cron job on a machine you have to keep running, no hosting cost.
The webhook URL and any other secrets go into the repo's encrypted secrets, not into the script itself, so nothing sensitive ends up committed to the repository.
Where the 30 minutes goes
Most of the time is the workflow file, not the Python. Getting the YAML syntax right for the schedule trigger, making sure the secret gets passed into the script as an environment variable, and testing that a failed check actually triggers the alert — that's the bulk of it. The Python itself is short enough to write in a few minutes once you know what the request and webhook call need to look like.
If you'd rather see the whole thing built out step by step instead of piecing it together from this summary, I wrote the full version with the actual code in this Python uptime monitor guide.
Skipping the build entirely
If you don't need to build this yourself, there's a ready-to-use template with the script and workflow already set up — you plug in the URL and the webhook, and it's running.
Where this approach has real limits
This isn't a replacement for a proper monitoring tool if you need historical uptime data, multi-region checks, or alerting that escalates through multiple channels if the first one doesn't get acknowledged. It's also only as reliable as GitHub Actions' scheduler, which can run a few minutes late under load — fine for a personal project, not something to rely on for anything with a strict SLA.
For checking that your side project's site is actually up, though, it does the whole job for free.
More free, no-paid-tools build guides like this over at Procwire.
Top comments (0)