From df4e60f84c040ec66985f0a40355739ff4c61ed4 Mon Sep 17 00:00:00 2001 From: Fredrik Date: Wed, 20 Jun 2018 21:37:33 +0200 Subject: [PATCH 001/160] finally merged my local hack with the real thing --- README.md | 8 +++++++ report.sh | 66 +++++++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 62 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index b2a81ab..ca82743 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Original script by joeschmuck, modified by Bidelu0hm, then by melp Preview of the output here: http://i.imgur.com/t9Mtqyt.png +or when a resilver is in progress: https://i.imgur.com/CUNUZ7r.png + **At a minimum, you will need to enter your email address in user-definable parameter section.** Feel free to edit other user parameters as needed. @@ -9,6 +11,12 @@ Preview of the output here: http://i.imgur.com/t9Mtqyt.png **Changelog:** +- fixed the broken border on zpool status summary header +- in statusOutput changed grep to scrub: instead of scrub +- added elif for resilvered/resilver in progress and scrub in progress with (hopefully) som useful info fields +- changed the email subject to include hostname and date & time + + *v1.3:* - Added scrub duration column - Fixed for FreeNAS 11.1 (thanks reven!) diff --git a/report.sh b/report.sh index f25c490..1266d93 100644 --- a/report.sh +++ b/report.sh @@ -8,6 +8,14 @@ ### Version: v1.3 ### Changelog: +# v1.? +# - fixed the broken border on zpool status summary header +# - in statusOutput changed grep to scrub: instead of scrub +# - added elif for resilvered/resilver in progress and scrub in progress with (hopefully) som useful info fields +# - changed the email subject to include hostname and date & time +# - +# - +# - # v1.3: # - Added scrub duration column # - Fixed for FreeNAS 11.1 (thanks reven!) @@ -70,7 +78,7 @@ backupLocation="/path/to/config/backup" # Directory in which to save FreeNAS c ###### Auto-generated Parameters host=$(hostname -s) logfile="/tmp/smart_report.tmp" -subject="Status Report and Configuration Backup for ${host}" +subject="[${host}] Status Report and Configuration Backup $(date "+%Y-%m-%d %H:%M")" boundary="gc0p4Jq0M2Yt08jU534c0p" if [ "$includeSSD" == "true" ]; then drives=$(for drive in $(sysctl -n kern.disks); do @@ -158,7 +166,7 @@ fi # Write HTML table headers to log file; HTML in an email requires 100% in-line styling (no CSS or