Repository navigation
feat(observability): watch Saruman's thin pools and its Proxmox firewall (#538, #576) - #639
Merged
Merged
Conversation
…all (#538, #576) A thin pool is not a filesystem, so HostDiskCritical and HostDiskWillFillIn24h could not see pve/data or large_data. A pool that fills turns every guest on it read-only at once. Separately, #566 turned Saruman's firewall on and nothing checked that it stayed on. Two agent collectors are added beside guest-state, each with --print, --self-test, a unit, a timer and a row in install-agent-collectors.sh: - collect-thin-pool-state.sh reads lvs every 10 min. ThinPoolNearlyFull warns at 80% data or 60% metadata. ThinPoolWillFillIn24h is critical: predict_linear over 6h, once the pool is half used. Data and metadata are told apart by a `space` label. - collect-pve-firewall-state.sh reads pve-firewall status every 5 min and counts the active rules in cluster.fw and host.fw. PveFirewallDisabled is critical after 10 min. A failed command writes nothing, so a failure is never reported as zero pools or as the firewall being off. ThinPoolStateStale and PveFirewallStateStale fire on the file's mtime rather than on presence, because a textfile series is still served after its collector stops. Both collectors were run with --print on Saruman on 2026-09-22 and read 7.87% / 1.55% data on the two pools, enabled/running, and four host.fw rules. That output is the thin-pool fixture. Five rules and ten promtool cases are added; counted claims and the runbooks are updated. Refs #538, #576 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 23, 2026
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
There are two gaps on
Saruman, and both follow the patternguest-statealready uses.HostDiskCriticalandHostDiskWillFillIn24hcan't seepve/dataorlarge_data/large_data. A pool that fills turns every guest on it read-only at once.collect-thin-pool-state.shlvs --select 'lv_attr=~^t'ThinPoolNearlyFull(warning: 80% data or 60% metadata),ThinPoolWillFillIn24h(critical:predict_linearover 6h, once the pool is >50% used),ThinPoolStateStalecollect-pve-firewall-state.shpve-firewall status, plus active rules incluster.fwandhost.fwPveFirewallDisabled(critical, 10m),PveFirewallStateStaleChoices worth reviewing:
lvsis never reported as zero pools, and an unreadable status is never reported as the firewall being off. This follows the lesson fromguest-state.node_textfile_mtime_seconds, not presence. A textfile series is still served after its collector stops, so only the file's age shows the timer died (the same reasoning asSmartStateStale).spacelabel vialabel_replace. The two series share a label set, so a bareorwould give the alert duplicate label sets whenever both crossed at once. The first rule test covers exactly that case.enabled/stoppedcounts as off. That is the statepve-firewall stopleaves behind.homelab-guest-state.service. Mount-namespace directives are left off because/etc/pveis a FUSE mount, and an unreadablehost.fwwould read as zero rules.Verified
--printonSarumanon 2026-09-22 (read-only). Results:large_data7.87% data / 0.42% metadata,pve/data1.55% / 0.29%, firewallenabled/running,host.fw4 rules,cluster.fw0 rules. The thin-pool fixture is thatlvsoutput.promtool test rulespasses for all test files (promtool 3.14.0, matching the pinned image), andpromtool check metricspasses on both collectors' output.self-tests.shpasses for both new suites (10 and 5 fixtures).check_docs.pyall pass.backup-offsite.sh's "DEST under /tmp" fixture fails where/tmpis a tmpfs. That's true onSaruman, not on the CI runner.Not done here: needs the host
make install-agent-collectors AGENT=root@10.0.30.110 ARGS='--only thin-pool-state'andARGS='--only pve-firewall-state'prometheus:homelab_thin_pool_data_percent{host="Saruman"}andhomelab_pve_firewall_enabled{host="Saruman"}PveFirewallDisabledonce on purpose (pve-firewall stop, wait about 15 min,start) and watch it resolveThese are why the PR says Refs rather than Closes. Both issues close once the steps above are done.
Refs #538, #576
🤖 Generated with Claude Code