Skip to content

Service down, but the down alert stays silent

Observabilitytested on Prometheus 3.15, k3s 1.37

A down alert on up only checks whether Prometheus can scrape the pods. If the pods are not ready because their database is gone, the service sends them no more requests – but they are still scraped, and up stays 1.

Symptom

amtool alert query namespace=app
Alertname             Starts At                Summary                               ...
NotesApiErrors        2026-11-05 10:37:53 UTC  notes-api: 62.5% Fehler               ...

In the course the database is gone. NotesApiDown stays silent, NotesApiErrors fires – but for the wrong reason: it counts the readiness probe's 503s.

Diagnosis

Which requests still arrive at all, and what does the database metric say?

promtool query instant http://localhost:30090 \
  'sum by (path, code) (rate(notes_http_requests_total[1m]))'
{code="200", path="/metrics"} => 0.1333333333333333 @[...]
{code="503", path="/healthz"} => 0.2222222222222222 @[...]
promtool query instant http://localhost:30090 'notes_db_up'

Causes

up stays 1Prometheus also scrapes pods that are not ready

A service's endpoints also contain pods with ready=false. That is why up stays at 1 and absent() does not fire.

503 on /healthzThe error rate measures the wrong requests

User requests already fail at the service; notes-api never sees them. What remains is the readiness probe and /metrics – the probe's 503s push the rate up.

Fix

Start the database again and add a rule that looks directly at the dependency, such as max(notes_db_up) == 0.
kubectl -n app scale statefulset postgres --replicas 1

Don't: Rely on up alone – up measures reachability for Prometheus, not for users.

▶
Break it yourself and find it – free
Observability hands-on, Day 15: a competition with faults you solve with metrics, logs and traces together.
Go to day 15 →

FAQ

Why does the SLI with path="/notes" show 0 percent errors?

Because no user requests reach notes-api any more – the service does not send them to pods that are not ready. No errors here means no traffic.

How do I find gaps like this?

In exercises like this one – take a dependency down on purpose and check which alert fires for which reason.

Related error patterns

More