Skip to content

Instantly share code, notes, and snippets.

@obilodeau
Created June 28, 2018 14:26
Show Gist options
  • Save obilodeau/0e3a1d9a07f70b5e7fdf259e37f9e9b7 to your computer and use it in GitHub Desktop.
Save obilodeau/0e3a1d9a07f70b5e7fdf259e37f9e9b7 to your computer and use it in GitHub Desktop.
#!/bin/bash
PATH=/usr/sbin:/sbin
# Dell RAID
RAID_GROUPS=( 0 )
for RAID_GROUP in ${RAID_GROUPS[@]}; do
mpt-status -i $RAID_GROUP -s >/dev/null
if [ $? -ne 0 ]; then
echo "There is a problem in RAID group $RAID_GROUP. Investigate on the server with mpt-stats or OpenManage."
fi
done
# ZFS
ZFS_STATUS=`zpool status -x`
if [[ "$ZFS_STATUS" != "all pools are healthy" ]]; then
echo "There is a problem with ZFS. Investigate on the server with zpool status."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment