Last active
March 12, 2021 08:57
-
-
Save rm1138/7d3d0e51fc5eb3956cdcb3c75bc80b30 to your computer and use it in GitHub Desktop.
ZFS pool status checker, use this with cron job and healthchecks.io. The first argument is the number of pool in your system.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ONLINE_COUNT=`zpool status | grep 'state: ONLINE' | wc -l` | |
if [ "$ONLINE_COUNT" = "$1" ] | |
then | |
exit 0 | |
else | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment