Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Check ZFS file systems and data pools
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
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.
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)
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 (/^NAME\s+SIZE\s+USED\s+AVAIL\s+CAP\s+DEDUP\s+HEALTH\s+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.
I've made a change into get_zpool_data() and it worked.
next if (/^NAME\s+SIZE\s+USED\s+AVAIL\s+CAP\s+DEDUP\s+HEALTH\s+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.
bynix, June 17, 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}
"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}
byfabio79rm, April 18, 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
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
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
OK: ZFS on testsystem - No zfs failures detected
Can we print zpool names, free space etc?
Thanks