health-check.sh: fix total disk usage label to show root filesystem instead of empty mount point

This commit is contained in:
Justin Oros
2026-04-22 09:47:25 -07:00
parent f9d0717b71
commit 2928285143

View File

@@ -67,11 +67,11 @@ check_disk() {
total_kb=$(df --block-size=1K / | awk 'NR==2 {print $2}')
total_pct=$(( used_kb * 100 / total_kb ))
if [ "$total_pct" -ge 90 ]; then
fail "Total disk usage at ${total_pct}% on / — critically low"
fail "Total disk usage at ${total_pct}% (root filesystem) — critically low"
elif [ "$total_pct" -ge 80 ]; then
warn "Total disk usage at ${total_pct}% on /"
warn "Total disk usage at ${total_pct}% (root filesystem)"
else
ok "Total disk usage at ${total_pct}% on /"
ok "Total disk usage at ${total_pct}% (root filesystem)"
fi
}