trails/infrastructure
Ullrich Schäfer 278e74f08e
Fix Overpass health + cache-hit stat panels: vector(0) not clamp_min
The original formulas used clamp_min(denominator, 1) to avoid divide-
by-zero, but that inflates the denominator when request rate is < 1/s.
Real example from prod: ~0.04 req/s, all successful, displayed as
1.02% health (red) instead of ~100%.

Switch to (numerator or vector(0)) / denominator:
- Missing "hit" series (no cache hits yet) → numerator resolves to 0
  instead of empty set, so the stat shows 0% instead of "No data".
- Zero traffic (empty denominator) → whole expr is empty, Grafana
  renders "No data", which is the correct behaviour for a health
  stat when nothing's happening.
- Non-zero low traffic → ratio is true ratio, not artificially
  depressed by the clamp.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 02:42:50 +02:00
..
grafana Fix Overpass health + cache-hit stat panels: vector(0) not clamp_min 2026-04-18 02:42:50 +02:00
loki Pass Grafana env vars to Caddy container, fix Loki compactor config 2026-03-27 13:53:56 +01:00
postgres Add pg-boss background job queue with session expiry 2026-04-13 21:17:24 +02:00
prometheus Reduce Prometheus scrape interval from 15s to 5s 2026-04-03 10:15:08 +01:00
promtail Fix journal health check and improve log collection 2026-04-12 15:00:00 +02:00
scripts Add infrastructure: Terraform, Docker Compose, BRouter, CD pipeline (#2) 2026-03-22 13:32:01 +01:00
terraform Harden SSH: disable passwords, forwarding, add keepalive 2026-03-29 22:32:30 +02:00
.env.example Add infrastructure: Terraform, Docker Compose, BRouter, CD pipeline (#2) 2026-03-22 13:32:01 +01:00
Caddyfile Allow Planner to connect to Journal in CSP 2026-03-27 21:34:41 +01:00
docker-compose.yml Route Overpass through server-side proxy with cache + coalescing 2026-04-18 02:04:50 +02:00
secrets.app.env Update Sentry auth token with org:ci scope 2026-04-13 02:27:53 +02:00
secrets.infra.env Add GRAFANA_SERVICE_TOKEN to encrypted infra secrets 2026-03-29 19:49:29 +02:00