ZFS の ZPOOL の状態を監視して異常時にメールするシェルスクリプト。ただそれだけ。
/etc/cron.hourly/zpool_satatus
#!/bin/sh
status=$(zpool status -x 2>&1)
host=$(hostname)
if [ 'all pools are healthy' != "$status" -a 'no pools available' != "$status" ]; then
zpool status | mail -s "[ACTION REQUIRED] zpool satus on ${host}" root
fi