Header RSS Feed
 
» Nagios Plugins

Nagios/Monitoring Plugin: check_zpools

Last Update: October 02, 2014

This plugin was created to monitor the usage and status of ZFS Pools (zpools). The code was based on the plugin "Check Solaris ZFS Pools" but was completely rewritten in order to allow running the plugin on multiple OS.

The plugin supports a warning and a critical threshold for the usage (like disk usage) on the ZFS Pool.
If one of the disks in the ZFS Pool is set to DEGRADED, the plugin will return a CRITICAL status.

Performance data are integrated for usage.

Download check_zpools.sh check_zpools.sh
Download plugin and save it in your Nagios plugin folder (e.g. /usr/local/nagios/libexec)
6070 downloads so far...

Contribute on github!
https://github.com/Napsty/check_zpools

Version History
# 2006-09-01 Original first version
# 2006-10-04 Updated (no change history known)
# 2013-02-04 Forked and released
# 2013-05-08 Make plugin work on different OS, pepp up plugin
# 2013-05-09 Bugfix in exit code handling
# 2013-05-10 Removed old exit vars (not used anymore)
# 2013-05-21 Added performance data (percentage used)
# 2013-07-11 Bugfix in zpool health check
# 2014-02-10 Bugfix in threshold comparison
# 2014-03-11 Allow plugin to run without enforced thresholds

Tested on OS...
- Solaris 10/11
- OpenSolaris
- SmartOS
- FreeBSD

I successfully use the plugin on 80 different physical servers running ZFS.

------------------------

Usage

./check_zpools.sh -p (poolname|ALL) [-w warnpercent] [-c critpercent]

The plugin must be executed directly on the server running the ZFS pool(s).
If you use NRPE, you need to define the command in your nrpe config.

Practical example:

./check_zpools.sh -p ALL -w 80 -c 90

------------------------

Definition of the parameters

-p Name of the pool to monitor. If set to "ALL", all available zfs pools will be checked.
-w Warning threshold for usage in percent
-c Cricital threshold for usage in percent
--help Show this help/usage.

------------------------

Command definition in your nrpe config on the target server:

command[check_zpools]=/usr/local/libexec/nagios/check_zpools.sh -p $ARG1$ -w $ARG2$ -c $ARG3$

You need to adapt the path to match the location of the plugin, of course.

------------------------

Service checks:

# check zfs pools
define service{
use generic-service
host_name mysolarisserver
service_description ZFS Pools
check_command check_nrpe!check_zpools!-a "ALL" "80" "90"
}

In this example, check_zpools will be executed on the remote server "mysolarisserver" through NRPE.
All available zfs pools should be checked and a warning issued, if the usage is at 80% or higher.
A critical state should be issued, when the usage is at 90% or higher.

------------------------

Nagios screenshots:

Nagios check zpools zfs pools

zfs pool graph

check_zpools pnp4nagios


Go to Homepage home
Linux Howtos how to's
Monitoring Plugins monitoring plugins
Links links

Valid HTML 4.01 Transitional
Valid CSS!
[Valid RSS]

6979 Days
until Death of Computers
Why?