summaryrefslogtreecommitdiff
path: root/statuspage/checks/hw.sh
AgeCommit message (Collapse)Author
2026-07-01Say "never scrubbed" instead of "unknown" for pools with no scan historybatsumaru
Confirmed against the real box: a pool that's never had a scrub or resilver has no `scan:` line in `zpool status` output at all - it's not omitted due to a parsing bug, there's just nothing to report yet. "unknown" wrongly implied a parse failure. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-01Fix uptime to include hours/minutes, add a purple/gold themebatsumaru
hw.sh's uptime was parsed from `uptime`'s text output, which cut off at the first comma - dropping the H:MM part entirely. It also never actually rolled over to months/years for long uptimes (FreeBSD's uptime just keeps growing the day count). Replaced with a direct `sysctl kern.boottime` computation for a fully deterministic "Nd Hh Mm" format. Caught a real bug along the way: the first attempt at the sed extraction grabbed `usec` instead of `sec`, since "usec" contains "sec" as a substring and the pattern wasn't anchored tightly enough. render.sh's palette now uses purple/lavender for headings and borders and a gold accent (title underline, value-column text), taking cues from reference character art. The green/yellow/red/gray status squares are untouched - they carry semantic meaning the color scheme shouldn't interfere with. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-01Make the zpool check per-pool with capacity, scrub, and error statusbatsumaru
Replace the single "all pools are healthy" summary line with one row per pool (name, health, capacity) plus a scrub/errors row parsed from `zpool status <pool>`. A pool that's never been scrubbed but has no data errors still reports ok - lack of scrub history isn't itself a failure, only actual reported errors are. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-01Mark statuspage shell scripts executable in gitbatsumaru
core.fileMode is false in this repo (Windows checkout), so the earlier commit recorded every checks/*.sh, lib/common.sh, and render.sh as 100644. render.sh skips non-executable files silently, so without this the deployed page would render with zero rows. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-01Split monolithic status check.sh into modular check scriptsbatsumaru
Replace the single-file prototype with independently-addable check scripts (checks/*.sh) that each emit JSONL rows, a shared helper lib, and one orchestrator/renderer (render.sh) that groups rows by section and writes the static status page. A broken check script now shows up as a down/warn row instead of crashing the whole render. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>