Repository navigation
fix(lab): eden reports patch state, and PatchStateStopped skips it while off - #1588
Merged
Merged
Conversation
…ile off Redeploying the lab after #1585 put PatchStateStopped in pending for eden: it stopped reporting at its rebuild on 2026-11-13, because the old guest's timer was installed by hand and build-the-bloodhound-guest.md had no such step. The [1d] window had cleared the alert by 11-14. - The runbook's section 6 installs the patch-state collector; it is installed on eden and the lab reads it. - eden is on-demand (ADR-0079), so the rule's vanished-series branch leaves it out while none of its node metrics have arrived in an hour. A running eden with a dead collector still fires. - promtool: shut-down eden quiet at 3d and 10d, running eden without its collector fires; removing the exclusion fails the first case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified in the change to suppress stopped-collector alerts while the on-demand guest is powered off.
No open issues 🎉
What changed in this PR
Updates lab patch-state monitoring so the on-demand guest eden does not trigger a stopped-collector alert while powered off, following the longer alert lookback introduced in #1585.
Changes:
- Suppresses the vanished-series alert for
edenwhen no node metrics have arrived for an hour, while preserving detection when it is running. - Adds tests for shutdown and running-without-collector scenarios.
- Documents collector installation during guest setup and records the change.
| File | Description |
|---|---|
stacks/lab/prometheus/tests/lab.test.yaml |
Tests alert suppression while off and detection while running. |
stacks/lab/prometheus/rules/lab.rules.yaml |
Adds the on-demand exclusion to PatchStateStopped. |
docs/runbooks/build-the-bloodhound-guest.md |
Adds patch-state collector installation and verification. |
docs/changelog.md |
Records the collector restoration and alert behavior change. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
stacks/lab/prometheus/rules/lab.rules.yaml:PatchStateStopped's vanished-series branch leaves out an on-demand guest (eden) while none of its node metrics (node_boot_time_seconds) have arrived in an hour. The comment explains why the guest is named rather than read from a tag.stacks/lab/prometheus/tests/lab.test.yaml: two cases. A shut-downedenis quiet at 3 d and 10 d. A runningedenwithout its collector fires.docs/runbooks/build-the-bloodhound-guest.md§6: installs the patch-state collector before the guest is shut down.docs/changelog.md: a 2026-11-19 entry.Why
Redeploying the lab after #1585 put
PatchStateStoppedin pending foreden. It reported from 2026-11-08 until 23:04 UTC on 2026-11-12, then stopped when it was rebuilt the next morning. The old guest's timer had been installed by hand, the runbook had no such step, and the old[1d]window had quietly cleared the alert by 11-14.edenison-demandand off between sessions. Without the exclusion, the rule would fire six hours after every session ends, which is the always-firing shape ADR-0079 removed fromHypervisorGuestStopped. The lab can't readSaruman's Proxmox tags, so the guest is named in the rule, the same wayrole="endpoint"names the domain's endpoints.Blast radius
make up STACK=labonalexander.edenis off, a broken collector on it goes unseen. While it runs, it alerts like any other guest.Verification
promtool test rules tests/lab.test.yaml: SUCCESS.python3 scripts/check_docs.py: OK.edenafter the install: the timer is scheduled,apt-patch-state.promwas written at 20:29 UTC with mode 644, and the lab readshomelab_apt_upgrades_pending{host="eden"} 9.make validateand the Docker-based lint tools (no Docker on the Mac). CI runs them.🤖 Generated with Claude Code