Interview Prep/Monitoring & Observability/Alerting and Alertmanager

Alert rule never loads; `/rules` does not list it

BeginnerTroubleshootingAlerting and Alertmanager
Answer

Likely causes → The file is not in rule_files glob, Prometheus was not reloaded, or (Operator) the PrometheusRule lacks the label the ruleSelector expects.

Diagnose →

curl -s localhost:9090/api/v1/rules | jq '.data.groups[].name'
kubectl get prometheus -n monitoring -o jsonpath='{.items[0].spec.ruleSelector}'

Fix → Add the file/glob, reload, or add the label (often release: kube-prometheus-stack).

Prevent → Lint that every PrometheusRule carries the selector label.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Alerting and Alertmanager