Skip to content

Blackbox Exporter

The Prometheus blackbox exporter probes every public host on hetzner-mgmt from inside the cluster, through its public address like a user, as decided in ADR 0018. Prometheus Operator Probe resources tell Prometheus what to probe; the results are ordinary series (probe_success, probe_duration_seconds, probe_http_status_code), so the alerts, Grafana and the incident pipeline need nothing new.

Where things live

What Where
Exporter (chart prometheus-blackbox-exporter, namespace monitoring, service blackbox-exporter:9115) components/blackbox-exporter/helmrelease.yaml
Probe of a platform component, with the host of its HTTPRoute components/<component>/probe/probe.yaml
Probes of workload repositories' hosts (Taskbase, Emiliero, Botyard, Helloweekly) cluster/hetzner-mgmt/blackbox-exporter/probes/probe.yaml
Flux wiring: blackbox-exporter, then blackbox-exporter-probes cluster/hetzner-mgmt/blackbox-exporter/
Alerts ProbeFailed and GiteaAPISlow probes group in components/prometheus-stack/config/prometheus-rules.yaml

The Probes are applied by their own Flux Kustomization after the exporter, not by each component's Kustomization, so a component never waits for the Probe CRD of the Prometheus stack (Keycloak and OpenBao come before it).

The http_2xx module

One module for every target: an HTTPS GET over IPv4 with a 5 s timeout that follows redirects and succeeds when the final answer is 2xx. A host that redirects (Keycloak to its console, Grafana and Helloweekly to the Keycloak login) passes when the redirect's destination answers. Plain HTTP fails (fail_if_not_ssl).

What is probed

Probe Targets component repository
gitea https://gitea.prod.skatzi.com gitea
gitea-api https://gitea.prod.skatzi.com/api/healthz gitea
keycloak, harbor, mattermost, openbao, docs https://<name>.prod.skatzi.com the same name
prometheus-stack https://grafana.prod.skatzi.com, https://prometheus.prod.skatzi.com prometheus-stack
taskbase-prod https://taskbase.skatzi.com, https://mcp.taskbase.skatzi.com/healthz, https://taskbase.skatzi.com/api/health taskbase-prod Skatzi/taskbase
taskbase-dev https://taskbase.dev.skatzi.com, https://mcp.taskbase.dev.skatzi.com/healthz, https://taskbase.dev.skatzi.com/api/health taskbase-dev Skatzi/taskbase
emiliero https://emiliero.skatzi.com emiliero Skatzi/emiliero
botyard-control https://botyard.skatzi.com botyard-control Dupondforge/botyard-control
helloweekly https://helloweekly.skatzi.com helloweekly Emmalia/Helloweekly
helloweekly-dev https://helloweekly-dev.skatzi.com/api/health helloweekly-dev Emmalia/Helloweekly
agent-runners Taskbase /api/health, MCP /healthz, Gitea /api/healthz, Keycloak's skatzi realm discovery, OpenBao /v1/sys/health, probed from inside agent-runners agent-runners

Limits worth knowing:

  • Gitea API latency uses /api/healthz, which pings the database and the cache. Gitea runs with REQUIRE_SIGNIN_VIEW, so every anonymous /api/v1 call (such as /api/v1/repos/search) answers 403; a query on real tables would need a token.
  • The MCP servers answer 401 on / without a token, so they are probed on /healthz.
  • Taskbase /api/health answers 200 only when the API can run a query on its database pool; the UI and the MCP /healthz do not touch it, so a pool deadlock (incident 2026-11-03) raised no alert before. A failure fires ProbeFailed with component: taskbase-prod or taskbase-dev.
  • agent-runners uses its own prober, agent-runner-probe.agent-runners.svc:9115 (components/agent-runner/probe), whose pod the runners' Cilium policies select. It fails when the runners lose a host that the internet still reaches, as in the 2026-10-20 incident. Its Probe is in cluster/hetzner-mgmt/agent-runners/probe/, applied by the agent-runner-probe Kustomization.
  • Helloweekly is behind the auth proxy (components/auth-proxy): an anonymous request ends on the Keycloak login page, so the probe checks the gateway, the proxy and Keycloak, not the app behind them.
  • Helloweekly dev has no login, but its public route (cluster/hetzner-mgmt/helloweekly/dev-route) matches only GET /api/health, the endpoint its promotion gate reads; every other path answers 404, so the probe targets that path.

Alerts

Both are incidents (incident: "true") and carry the Probe's component and repository labels:

Alert Fires when Severity Runbook
ProbeFailed probe_success == 0 for 5 minutes, any Probe critical ProbeFailed
GiteaAPISlow probe_duration_seconds{job="gitea-api"} > 2 for 10 minutes warning GiteaAPISlow

Their unit tests are in components/prometheus-stack/tests/rules-test.yaml; see Prometheus stack.

Add a public host

In the pull request that adds the host's HTTPRoute:

  1. Platform component: add the host to components/<component>/probe/probe.yaml. A component without a probe gets a probe/ directory with a probe.yaml and a kustomization.yaml (copy components/harbor/probe/), listed in cluster/hetzner-mgmt/blackbox-exporter/probes/kustomization.yaml.
  2. Workload repository: add a target, or a Probe per component, to cluster/hetzner-mgmt/blackbox-exporter/probes/probe.yaml, with repository: owner/repo so the incident goes to the repository that owns the fix.
  3. Give every Probe the label release: monitoring-kube-prometheus-stack (Prometheus selects Probes by it), module: http_2xx and a component label.
  4. Check the target passes before merging: curl -sL -o /dev/null -w '%{http_code}\n' https://<host>/ must end in 2xx. If it needs a token, probe a health path instead, as for the MCP servers.
  5. Run kustomize build cluster/hetzner-mgmt/blackbox-exporter/probes.

After the merge, probe_success{instance="https://<host>"} appears in Prometheus within a minute of Flux applying it.