Interview Prep/SRE & Reliability/Prometheus SLIs & Recording Rules

The target shows DOWN with `server returned HTTP status 404 Not Found`.

BeginnerTroubleshootingPrometheus SLIs & Recording Rules
Answer

Likely causes → Wrong metrics path (the app serves /actuator/prometheus or /stats/prometheus, not /metrics), wrong port (scraping the app port instead of a separate metrics port), or metrics disabled in this build.

Diagnose →

kubectl -n shop port-forward svc/checkout 8080:8080 &
curl -s -o /dev/null -w '%{http_code}\n' localhost:8080/metrics

Fix → Set path: and port: correctly in the ServiceMonitor endpoint.

Prevent → Standardize the metrics path and port across services in the platform template.

All SRE & Reliability questions Roadmap: SRE & incident response

More on Prometheus SLIs & Recording Rules