Solaris

Check ZFS file systems and data pools

Description:

check zfs file system and zfs data pools

Current Version

Last Release Date

June 15, 2009

Compatible With


Project Files
Project Notes
This will check zfs datapools and the reservation and quota settings on zfs file systems. to check the reservations and quotas you have to use -f and -q options together. Thi will also checka single datapool of file system See help -h) form more details.
Reviews (4) Add a Review
Problem with solaris 11
by toni_comerma, December 31, 2013
Good check, but the script has problems checking zpools with solaris 11, as a new column has been added: DEDUP.

I've made a change into get_zpool_data() and it worked.

next if (/^NAMEs+SIZEs+USEDs+AVAILs+CAPs+DEDUPs+HEALTHs+ALTROOT/);
my ( $pool, $size, $used, $avail, $cap, $dedup, $health, $altroot ) = split( /s+/, $_ );

#@{$pools{$pool}} = ($pool, $size, $used, $avail, $cap, $health, $altroot);
$zpools{$pool} = {
size => "$size",
used => "$used",
avail => "$avail",
cap => "$cap",
dedup => "$dedup",
health => "$health",
altroot => "$altroot",
};

I expect it could be useful for others.
0 of 1 found this review helpful.
Helpful? Yes  No 1
Detailed output.
by nix, June 30, 2011
Yes, We are getting only this output.

"OK: ZFS on testsystem - No zfs failures detected"

can we get more detailed output for ZPOOL and DATASET. No need of hostname in output.

Ex:

OK ZPOOL rpool : ONLINE {Size:149G Used:5.73G Avail:143G Cap:3% Dedup:1.00x}
Helpful? Yes  No 
NRPE: Unable to read output
by fabio79rm, April 30, 2011
Hello

thanks for the check, it works locally on my Solaris10 box also for the nagios user without sudo configurations, so I updated my nrpe.cfg with a line like:
command[check_zfs_pools]=/opt/csw/libexec/nagios-plugins/check_zfs.pl -p

but Nagios side when it doesn't work:
[root@t3nagios ~]# /opt/nagios-plugins/lib/nagios/plugins/check_nrpe -H t3fs11 -c check_zfs_pools
NRPE: Unable to read output

please some clues ?

many thanks,
fabio
Helpful? Yes  No 
Printing detailed output
by solaris, April 30, 2011
Thanks for an excellent job, makes it much easier to monitor zfs using nagios. One question How to print detailed output? We always get result like

OK: ZFS on testsystem - No zfs failures detected

Can we print zpool names, free space etc?

Thanks
0 of 1 found this review helpful.
Helpful? Yes  No 1
Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4.5 (4)
Favorites
0
Views
175,111