Solaris NRPE Plugin to check zpools

Kleines script zum ueberpruefen von zpools unter Solaris 10 fuer Nagios (NRPE). Als kleines feature checked es gleich noch die chksum ;) und alles ohne wilden Abhaengigkeiten….

Usage:

[steffen@zserver zpool]$ bash check_zpool.sh
Usage: check_zpool.sh -w=<VALUE> -c=<VALUE> -chksum=<VALUE>

Example:

root@zserver:~# bash check_zpool.sh -w=80 -c=90 -chksum=5
ZP_NFS1: CAPACITY:48 HEALTH=ONLINE CHKSUM=OK
ZP_NFS2: CAPACITY:55 HEALTH=ONLINE CHKSUM=OK
root@zserver:~# echo $?
0
root@zserver:~# bash check_zpool.sh -w=50 -c=90 -chksum=5
ZP_NFS1: CAPACITY:48 HEALTH=ONLINE CHKSUM=OK
ZP_NFS2: CAPACITY:55 HEALTH=ONLINE CHKSUM=OK
root@zserver:~# echo $?
1
root@zserver:~# bash check_zpool.sh -w=40 -c=51 -chksum=5
ZP_NFS1: CAPACITY:48 HEALTH=ONLINE CHKSUM=OK
ZP_NFS2: CAPACITY:55 HEALTH=ONLINE CHKSUM=OK
root@zserver:~# echo $?
2
root@zserver:~#

Download: check_zpool.sh

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.