fix(monitoring): one cc:watch_state rule for queue, lint fatal (hc-150) #631
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "promtool-lint-fatal"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
apps/monitoring/prometheus-rules-command-center.yaml: the twocc:watch_state{domain=queue}recording rules are now one rule. Weights are unchanged:queue_starvedandshepherd_stucktrip at 2,heal_flappingandboard_chainat 1, and any of the four going stale gives 1.scripts/test-prometheus-rules.sh:promtool check rules --lint-fatal, so a duplicate rule fails the gate.assumed: merging into one rule (not deleting one) because the two rules covered different watches, so deleting either would drop a watch from the queue domain.
Verified
Run with promtool v3.8.0 in docker, rules extracted from
.specthe same way the script does (yq was not installed locally).--lint-fatal: command-center FAILED, "lint error 1 duplicate rule(s) found", exit 3.--lint-fatal: all 6 files SUCCESS (command-center 84 rules, was 85), exit 0.promtool test rules: exit 0, same as master.Item: promtool-check-rules-prints-lint-error-1
Task: hc-150
Two recording rules wrote cc:watch_state{domain=queue}; promtool reported "lint error 1 duplicate rule(s)" and the two could disagree. Fold them into one rule that keeps each watch's weight (queue_starved/shepherd_stuck 2, heal_flapping/board_chain 1), and pass --lint-fatal so a duplicate fails CI.