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

Prometheus refuses to load the rules file: `invalid recording rule name: slo-checkout-error-ratio-5m`.

BeginnerTroubleshootingPrometheus SLIs & Recording Rules
Answer

Likely causes → Recording rule names must be valid metric names: letters, digits, underscores and colons only. Hyphens are not allowed.

Diagnose →

promtool check rules slo-rules.yaml

Fix → Rename following the level:metric:operations convention: slo:sli_error:ratio_rate5m.

Prevent → Lint in CI with promtool check rules, and document the naming convention.

All SRE & Reliability questions Roadmap: SRE & incident response

More on Prometheus SLIs & Recording Rules