diff options
| author | batsumaru <> | 2026-07-01 17:12:46 +0900 |
|---|---|---|
| committer | batsumaru <> | 2026-07-01 17:12:46 +0900 |
| commit | 47bc0a5a7091bcf716ba1518b3c0ea18a64dc462 (patch) | |
| tree | 8b7bbc751a764241c81ce3bc19cff3bee954386b /statuspage/checks/hw.sh | |
| parent | 45f7fb33d96350798bfcc16877be152e2fa308bf (diff) | |
Say "never scrubbed" instead of "unknown" for pools with no scan history
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>
Diffstat (limited to 'statuspage/checks/hw.sh')
| -rwxr-xr-x | statuspage/checks/hw.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/statuspage/checks/hw.sh b/statuspage/checks/hw.sh index 54c4718..384ab4a 100755 --- a/statuspage/checks/hw.sh +++ b/statuspage/checks/hw.sh @@ -55,5 +55,5 @@ for pool in $(zpool list -H -o name 2>/dev/null); do "") ERR_STATUS="warn" ;; *) ERR_STATUS="down" ;; esac - json_line "hardware" "zpool $pool scrub" "${SCAN:-unknown}" "$ERR_STATUS" + json_line "hardware" "zpool $pool scrub" "${SCAN:-never scrubbed}" "$ERR_STATUS" done |
