Monitoring and uptime: know before your customers do

Health endpoints, external checks, sensible alerts and honest uptime targets for small teams.

A cream gauge with a terracotta needle beside a potted plant

The worst way to find out your site is down is an email from a customer. By then they have already had a bad experience, and you are starting the investigation late.

This guide is for developers and small teams running web apps in production. You will learn what to check, how to check it from outside, what deserves an alert at 3am and what can wait, and how to set uptime targets with honest maths.

A health endpoint, an external uptime monitor and an error tracker cover most of what a small app needs.

Start with a health endpoint

A health endpoint is a URL your app answers quickly with a simple status. Monitors and hosting platforms call it to decide whether the app is alive.

Keep two ideas apart:

  • Liveness: is the process running and able to answer HTTP? This should be cheap and should not depend on other services.
  • Readiness or deep health: can the app do useful work? This checks the database, cache or other dependencies.

Here is a simple pair in Express:

JavaScript
const express = require('express');
const { Pool } = require('pg');

const app = express();
const pool = new Pool({ connectionString: process.env.DATABASE_URL });

// Liveness: cheap, no dependencies
app.get('/healthz', (req, res) => {
  res.status(200).json({ status: 'ok' });
});

// Deep check: confirms the database answers
app.get('/readyz', async (req, res) => {
  try {
    await pool.query('SELECT 1');
    res.status(200).json({ status: 'ok', database: 'ok' });
  } catch (err) {
    res.status(503).json({ status: 'error', database: 'unreachable' });
  }
});

app.listen(process.env.PORT || 3000, '0.0.0.0');

Why the split matters: if a platform restarts your app whenever a health check fails, a deep check tied to the database would restart a perfectly healthy app every time the database has a blip. Use the cheap check for restarts and the deep check for your external monitor.

External uptime checks

An unreachable app cannot report that it is unreachable, so uptime checks must run from outside your infrastructure.

Any HTTP uptime monitor works the same way: it requests a URL on a schedule, usually every one to five minutes, from several locations. If the response is missing, slow or has the wrong status code, it alerts you. Checking from multiple locations matters because a single location can have its own network problems; most monitors only alert when several locations agree.

What to monitor for a typical app:

  • Your home page, checking for a 200 status and ideally a word that should appear on the page.
  • Your deep health endpoint (/readyz above).
  • Any critical flow you can safely hit, such as the login page.
  • Your HTTPS certificate expiry, if your monitor supports it.

You can reproduce what a monitor sees with curl:

Terminal
curl -fsS -o /dev/null -w '%{http_code} %{time_total}s\n' https://example.com/readyz

-f makes curl fail on HTTP errors, and -w prints the status code and total time.

Alert on symptoms, not causes

A good alert means a person needs to act now. A bad alert trains people to ignore alerts.

Alert on what users feel:

  • The site or API is down or returning errors (5xx responses).
  • Responses are much slower than normal for several minutes.
  • A critical background job, such as sending invoices, has stopped completing.

Do not page anyone for causes that may not hurt users: CPU at 80%, one failed request, a single slow query. Record those as metrics and review them during working hours. High CPU with fast responses is a healthy, busy server.

Two practical rules:

  • Require a condition to persist (for example, two or three consecutive failed checks) before alerting.
  • Send urgent alerts somewhere people will notice, such as a phone notification, and non-urgent ones to email or a chat channel.

Logs, metrics and traces

These three are often lumped together as observability. They answer different questions.

SignalWhat it isAnswersExample
LogsTimestamped records of eventsWhat exactly happened?Payment failed for order 1042
MetricsNumbers aggregated over timeHow much, how often, how fast?2% of requests returned 500
TracesOne request followed across servicesWhere did the time go?900 ms spent in a third-party API

For a single app, logs and a few metrics are usually enough; traces earn their keep once requests pass through several services. OpenTelemetry is the common open standard for producing all three without locking yourself into one vendor.

Log to standard output in a structured format such as JSON, with a timestamp, level and request ID. That makes logs searchable wherever they end up.

Error tracking

An error tracker captures unhandled exceptions with the stack trace, request details and how many users were affected, then groups duplicates. It tells you about bugs that never take the whole site down, such as a checkout error that affects one browser.

Most error trackers install as a small library and read a key from an environment variable. Scrub personal data and secrets before events leave your app; most tools have settings for this.

Uptime targets and SLOs

A service level objective (SLO) is a target for reliability, such as "99.9% of health checks succeed over 30 days". The gap between the target and 100% is your error budget: the downtime you can afford before you should slow down releases and fix reliability.

The maths, using an average month of about 30.44 days (43,830 minutes):

TargetAllowed downtime per monthAllowed downtime per year
99%about 7.3 hoursabout 3.65 days
99.5%about 3.65 hoursabout 1.8 days
99.9%about 43.8 minutesabout 8.8 hours
99.95%about 21.9 minutesabout 4.4 hours
99.99%about 4.4 minutesabout 53 minutes

With a 30-day month, 99.9% allows 43.2 minutes. Either way, each extra nine cuts the budget by a factor of ten, and the cost and effort of achieving it rise steeply. For most small businesses, 99.9% for the main site is a sensible goal, and a few minutes of downtime during a deploy is not worth heroic engineering to avoid.

Measure your SLO from the user's side, using your external monitor, not from inside the server.

Status pages

A status page tells customers what is happening during an incident, which cuts support load and builds trust. Host it separately from your app, so it stays up when the app does not. Many uptime monitors include a hosted status page.

Keep updates short and factual. RemoteGeeks publishes the platform's own status at /status, which is worth checking first if several of your apps misbehave at once.

On-call for small teams

You do not need a formal rota with five people. You do need clarity:

  • Decide who receives urgent alerts each week, and who is the backup.
  • Agree what counts as urgent. If an alert fires and nobody needs to act, fix or remove it.
  • Write a short runbook for common problems: how to roll back, restart, and check the database.
  • After an incident, write a few lines on what happened and what will change. Keep it blameless.

What Launchpad handles and what you add

On Launchpad, a health check must succeed before a new deploy goes live, and health checks restart apps that stop responding. The Deployments tab shows each build log with the failure reason in plain words, and the Activity tab records actions taken on the app, including by AI tools. See deployments, logs and rollbacks for details.

Launchpad does not send uptime alerts to customers, so add an external uptime monitor pointing at your app's address or custom domain, plus an error tracker if your app has real users.

Step by step: a minimal monitoring setup

  1. Add a cheap /healthz endpoint and a deep /readyz endpoint to your app.
  2. Deploy, then confirm both respond with curl.
  3. Sign up for an HTTP uptime monitor and check /readyz and your home page every one to five minutes from several locations.
  4. Set alerts to fire after two or three consecutive failures, and send them to a phone notification.
  5. Add an error tracking library and set its key as an environment variable.
  6. Switch to structured logging with a request ID.
  7. Write a one-page runbook and share it with whoever is on call.

Common mistakes

  • Only checking from inside the server. Fix: use an external monitor from several locations.
  • Alerting on CPU or memory spikes. Fix: alert on errors and latency users feel; graph resources for review.
  • A deep health check used for restarts. Fix: keep the restart check cheap and dependency-free.
  • Alerts nobody acts on. Fix: delete or retune them until every alert means action.
  • Hosting the status page on the same server as the app. Fix: use a separate, hosted status page.

Security notes

  • Health endpoints should return status only, never configuration, secrets or stack traces.
  • Keep monitoring and error tracking keys in environment variables, not in code.
  • Scrub personal data from logs and error reports, especially emails, tokens and payment details.
  • Restrict who can edit alert settings, so nobody silences them by accident.

Troubleshooting

Monitor says down, but the site works for you

Cause: a regional network problem, DNS still propagating, or a firewall or bot protection blocking the monitor. Fix: check which locations failed, and allow the monitor's user agent or IP ranges if your firewall blocks it.

Frequent short alerts that resolve themselves

Cause: alerting on a single failed check, or a timeout set too low. Fix: require consecutive failures and set a timeout that matches normal response times.

App keeps restarting

Cause: the health check depends on a slow or failing service, or startup takes longer than the check allows. Fix: make the liveness check independent, and check the deploy logs for crashes on start.

Frequently asked questions

How often should an uptime monitor check?

Every one to five minutes suits most sites. Checking more often finds problems a little sooner but produces more noise. Combine it with a consecutive-failure rule.

Is 100% uptime possible?

Not realistically. Networks, providers and your own deploys all introduce some risk. Set a target your users actually need and treat the error budget as a planning tool.

Do I need a paid observability platform?

Not at first. A free or low-cost uptime monitor, an error tracker and structured logs cover a small app well. Add metrics dashboards and tracing as traffic and complexity grow.

What should I check first in an outage?

Your platform's status page, your latest deploy, and your error tracker. Most incidents follow a change, so rolling back is often the quickest fix.

Next steps

Good monitoring is mostly about a few well-chosen checks and alerts that always mean something. Set up the minimum today and refine it after each incident.

Share this articleLinkedIn (opens in a new tab)X (opens in a new tab)Facebook (opens in a new tab)
Was this article helpful?

Get new guides in your inbox.

One email a month. Unsubscribe anytime.