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.
More on Alerting and Alertmanager
An alert shows `Pending` in Prometheus but never goes to `Firing`BeginnerAn alert is `Firing` in Prometheus but nothing reaches AlertmanagerIntermediateAlertmanager shows the alert but Slack receives nothingBeginnerAlertmanager logs `notify retry canceled due to unrecoverable error after 1 attempts: channel_not_found`IntermediateAlertmanager logs `unexpected status code 404: no_service` / `invalid_token` for SlackBeginnerAlertmanager fails to load config: `yaml: unmarshal errors: field matchers not found in type config.plain`Intermediate