REST API monitoring
REST API monitoring means requesting one public GET route that touches the same database your endpoints use, on a fixed interval from outside your servers, and alerting on any status outside 200-399, which the free plans of Logdash, UptimeRobot and Better Stack all do.
A REST API fails in two kinds of ways. The kind an uptime check sees: it stops answering, it answers 5xx, it takes longer than the timeout. And the kind it does not: a field disappears from the JSON, one endpoint out of forty breaks, auth starts rejecting valid tokens. Uptime monitoring is for the first kind. Contract tests in CI are for the second. Buying a monitor to do the job of a test suite is how people end up with 200 checks and still no idea why checkout broke.
REST API health check: which route to watch
- Not the root path. Many REST frameworks answer
/with a 404 or a static banner, and neither tells you the database is reachable. - Not the docs page. Swagger UI is static files and stays up long after the API behind it has gone.
- A
/healthroute that runs one cheap query,select 1, and returns 503 when it throws. It fails for the same reason your real endpoints fail. - Or one public read endpoint with a small limit, such as a product list capped at one item, if you would rather watch a real path than a synthetic one.
- One route per service is enough. Ten monitors on ten endpoints sharing one database just send ten alerts for one outage.
The free tool you already have
#!/usr/bin/env bash
# Exits 1 if any endpoint answers outside 200-399 or takes over 10s.
for url in \
https://api.example.com/health \
"https://api.example.com/v1/products?limit=1"; do
# A timeout or a sixth redirect makes curl fail: count it as down.
code=$(curl -s -o /dev/null -L --max-redirs 5 --max-time 10 \
-w '%{http_code}' "$url") || code=000
echo "$code $url"
if [ "$code" -lt 200 ] || [ "$code" -ge 400 ]; then exit 1; fi
doneThat script uses the same rules a Logdash monitor uses: GET, 5 redirects, 10 seconds, 200 to 399 is up, and a timeout prints 000 and fails. It belongs in your deploy pipeline as a smoke test. As a monitor it has one flaw. It runs on a machine you own, so the night that machine has a problem is the night nobody gets told.
REST API monitoring free tools, honestly
Four hosted options check a REST endpoint at no cost. Better Stack gives 10 monitors at 3-minute checks. Checkly gives 10,000 API check runs a month with body and header assertions. UptimeRobot gives 50 monitors at 5 minutes. Logdash gives 5 services at 5 minutes, with Telegram alerts, a public status page, and the logs from the same API on the same screen if you add an SDK. None of the four is a bad pick. The table puts Logdash next to the one people most often start with.
- Add the service Create a service in Logdash and paste the health URL. The first check runs immediately and records the status code and response time.
- Connect Telegram once Add a Telegram channel at the domain level and every monitor in it can use it. A webhook channel works the same way if alerts should reach your own API instead.
- Make it fail Return 503 from the health route, or stop the database. One interval later the monitor flips to down and a Telegram alert arrives with the status code and the error body your API sent back.
Logdash vs UptimeRobot
| Feature | Logdash | UptimeRobot |
|---|---|---|
| Free monitors | 5 services, one HTTP monitor each | 50 monitors |
| Free check interval | Every 5 minutes | Every 5 minutes |
| Custom request headers | Not supported on any plan | On paid plans |
| Slow response alerts | None, response time is charted only | Paid plans, threshold from 50 to 5,000 ms |
| 15-second checks | Pro, $15 a month | Scale, €65 a month billed yearly, €77 monthly |
| Logs and metrics from the API itself | Eight SDKs into the same service view | Not part of the product |
When UptimeRobot is the better pick
- You have more than five REST services to watch and a budget of zero. Fifty free monitors is ten times what Logdash gives.
- The only route worth checking needs an API key header. UptimeRobot Solo sends one from €9 a month billed yearly. Logdash cannot send one on any plan.
- You want an alert when the API gets slow, not only when it fails. UptimeRobot Solo alerts on a threshold you set, Logdash only charts response time.