Update zfs report script

This commit is contained in:
Rufus King 2026-08-21 13:34:38 -04:00
parent 2b1bdb2e5a
commit fbdfa329be

5
zfs/nas08_zfs_report.sh Normal file → Executable file
View file

@ -17,8 +17,8 @@ TARGET_HOST="NAS08"
REPORT_TO="rufus.king@kingdezigns.com" REPORT_TO="rufus.king@kingdezigns.com"
REPORT_FROM="zfs-monitor@${TARGET_HOST,,}.local" REPORT_FROM="zfs-monitor@${TARGET_HOST,,}.local"
SCRUB_MAX_AGE_DAYS=8 # Warn if last scrub is older than this SCRUB_MAX_AGE_DAYS=8 # Warn if last scrub is older than this
CAP_WARN=80 # Capacity % that triggers WARNING CAP_WARN=90 # Capacity % that triggers WARNING
CAP_CRIT=90 # Capacity % that triggers CRITICAL CAP_CRIT=95 # Capacity % that triggers CRITICAL
# ────────────────────────────────────────────────────────────────────────────── # ──────────────────────────────────────────────────────────────────────────────
NOW=$(date '+%Y-%m-%d %H:%M:%S') NOW=$(date '+%Y-%m-%d %H:%M:%S')
@ -269,6 +269,7 @@ HTML=$(cat <<EOF
<td> <td>
<div style="font-size:11px;color:#94a3b8;letter-spacing:1px;text-transform:uppercase;">ZFS Pool Health Monitor</div> <div style="font-size:11px;color:#94a3b8;letter-spacing:1px;text-transform:uppercase;">ZFS Pool Health Monitor</div>
<div style="font-size:26px;font-weight:800;color:white;margin-top:4px;">&#128268; ${TARGET_HOST}</div> <div style="font-size:26px;font-weight:800;color:white;margin-top:4px;">&#128268; ${TARGET_HOST}</div>
<div style="font-size:26px;font-weight:800;color:white;margin-top:4px;">/usr/scripts/zfs/nas08_zfs_report.sh</div>
<div style="font-size:13px;color:#94a3b8;margin-top:4px;">${NOW} &nbsp;|&nbsp; ${POOL_COUNT} pool(s) monitored</div> <div style="font-size:13px;color:#94a3b8;margin-top:4px;">${NOW} &nbsp;|&nbsp; ${POOL_COUNT} pool(s) monitored</div>
</td> </td>
<td align="right"> <td align="right">