Server Administration

Server Uptime Monitoring: Tools, Checks and Alerts That Work

By NileVPS Team · Published · 5 min read

اقرأ المقال بالعربي

The worst way to learn that your website is down is from a customer. Uptime monitoring exists so that you find out first, ideally within a minute or two, and with enough detail to start fixing the problem. It is one of the cheapest and most valuable things you can add to any server. This guide explains what to monitor, which kinds of checks exist, how to choose between hosted and self-hosted tools, and how to design alerts that people actually respond to.

What uptime monitoring really checks

An uptime monitor is an outside observer that repeatedly asks a simple question: is this service answering correctly? If the answer is no for long enough, it notifies you. It does not replace resource monitoring (CPU, RAM, disk), but it measures what users experience, which is what matters most.

Types of checks

CheckWhat it testsGood for
HTTP(S)Status code, response time, optional keywordWebsites, APIs
KeywordPage contains (or lacks) specific textCatching error pages that return 200
Ping (ICMP)Host reachabilityBasic network presence
TCP portA port accepts connectionsSSH, databases, mail, game servers
DNSRecord resolves to the expected valueDetecting DNS mistakes or hijacks
SSL certificateDays until expiryAvoiding expired-certificate outages
Heartbeat (push)Your job pings the monitor on scheduleCron jobs, backups, bots

A ping check alone is weak: a server can answer ping while Nginx or the database is dead. Prefer an HTTP check against a real page, and if possible a lightweight health endpoint, such as /health, that verifies the database connection and returns 200 OK only when the app is truly working.

Heartbeat checks deserve special mention. Instead of the monitor calling you, your script calls the monitor at the end of each successful run:

/usr/local/bin/backup.sh && curl -fsS -m 10 --retry 3 https://monitor.example.com/ping/abc123 > /dev/null

If the ping does not arrive within the expected window, you get an alert. This is the best way to catch silent failures in scheduled tasks like those described in our cron jobs guide.

External or self-hosted?

External (hosted) services check from multiple locations on the internet. Their main advantage is independence: if your whole server or data center is unreachable, they still notice. Many offer a free tier with limited checks and intervals.

Self-hosted tools give you full control and no per-check fees. Popular options include:

  • Uptime Kuma: a friendly web UI for HTTP, TCP, DNS, keyword, heartbeat and certificate checks, with many notification channels.
  • Gatus: configuration-as-code health checks with status pages.
  • Prometheus Blackbox Exporter: probes endpoints and feeds Prometheus and Grafana, ideal if you already run that stack.

The golden rule: never monitor a server only from itself. If the machine goes down, so does the monitor. Run a self-hosted monitor on a separate small VPS, ideally in a different region, or combine it with an external service.

Quick start: Uptime Kuma with Docker

On a separate monitoring server with Docker installed:

docker volume create uptime-kuma
docker run -d --restart=unless-stopped \
  -p 3001:3001 \
  -v uptime-kuma:/app/data \
  --name uptime-kuma louislam/uptime-kuma:1

Open port 3001 only to your IP in the firewall, or better, put Kuma behind Nginx with HTTPS. Then create your first account, add an HTTP monitor for your site, set the interval to 60 seconds, and configure a notification channel such as email or Telegram. A small, inexpensive VPS is enough for this role.

Designing alerts people respond to

Monitoring fails when alerts are either missing or so noisy that everyone ignores them. A few principles help:

  • Confirm before alerting. Require two or three consecutive failures, or failure from more than one location, before sending a notification. Short network blips are common.
  • Alert on symptoms users feel: site down, checkout failing, response time far above normal. Not every CPU spike deserves a phone notification.
  • Use the right channel per severity. Critical outages go to an instant channel (Telegram, SMS, a phone call service); warnings like "certificate expires in 14 days" can go to email.
  • Send recovery notices, so people know when to stop investigating.
  • Define ownership. Every alert should have a person or rotation responsible for it.
  • Plan maintenance windows and pause checks during planned work.

What to monitor on a typical VPS

  • [ ] Homepage and one critical page (login, checkout) via HTTPS with a keyword check
  • [ ] A health endpoint that touches the database
  • [ ] SSL certificate expiry with a 14-day warning
  • [ ] TCP checks for SSH and any public service ports
  • [ ] DNS record of your main domain
  • [ ] Heartbeats for backups and other scheduled jobs
  • [ ] Optional status page to inform users during incidents

When an alert fires, your next stop is usually the logs. Our server logs guide shows where to look first.

FAQ

How often should uptime checks run?

Every 60 seconds is a sensible default for production websites. Shorter intervals detect problems slightly faster but create more requests and more false alarms. Less critical services can be checked every five minutes. Combine the interval with a confirmation rule so a single failed request does not page anyone.

Can I monitor uptime from the same server?

You can run checks locally for internal details, but they cannot tell you when the server itself is offline or unreachable from the internet. Always have at least one monitor outside the server, either on another VPS in a different location or through an external service.

What is the difference between uptime and performance monitoring?

Uptime monitoring answers whether a service responds correctly from the outside. Performance or resource monitoring tracks CPU, memory, disk and application metrics inside the server. You need both: uptime tells you that something is wrong, and resource metrics help explain why.

Related guides