trails/infrastructure/grafana/dashboards
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
..
business.json Remove type:dashboard from annotation config 2026-03-29 21:57:39 +02:00
infrastructure.json Unwrap dashboard JSON for Grafana provisioning 2026-03-29 22:18:06 +02:00
journal.json Add Journal dashboard, fix Caddy metrics, and improve alerts 2026-04-12 14:00:00 +02:00
overview.json Add Journal dashboard, fix Caddy metrics, and improve alerts 2026-04-12 14:00:00 +02:00
planner.json Fix Overpass health + cache-hit stat panels: vector(0) not clamp_min 2026-04-18 02:42:50 +02:00
service-health.json Add pg-boss background job queue with session expiry 2026-04-13 21:17:24 +02:00