suchpool / check_zfs Goto Github PK
View Code? Open in Web Editor NEWA NRPE/Nagios Check for Linux-based ZFS Pools
A NRPE/Nagios Check for Linux-based ZFS Pools
Good morning,
This is the first check_zfs port for linux that has worked for me. Thanks very much for the work. I'm having some trouble getting the plugin to report the status of my zpool via NRPE though. The plugin under /usr/lib64/nagios/plugins is world executable. I added the following line to /etc/nagios/nrpe.cfg
command[check_zfs]=/usr/lib64/nagios/plugins/check_zfs gray 3
I gave passwordless sudo privs to run zpool and zfs to users in the group zfs and added the users nagios and nrpe to the zfs group.
%zfs ALL=(ALL) NOPASSWD: /usr/sbin/zpool, /usr/sbin/zfs
[root@io01 plugins]# groups nagios
nagios : nagios zfs
[root@io01 plugins]# groups nrpe
nrpe : nrpe zfs
I've verified that the script gives returns the correct status on my zpool when executed locally by nagios and nrpe.
[root@io01 plugins]# su - nagios
Last login: Wed Oct 14 09:17:11 EDT 2015 on pts/0
-bash-4.2$ /usr/lib64/nagios/plugins/check_zfs gray 3
OK ZPOOL gray : ONLINE {Size:87T Used:5.81T Avail:81.2T Cap:6%} raidz2-0:ONLINE disk0:ONLINE disk1:ONLINE disk2:ONLINE disk3:ONLINE disk4:ONLINE disk5:ONLINE raidz2-1:ONLINE disk6:ONLINE disk7:ONLINE disk8:ONLINE disk9:ONLINE disk10:ONLINE disk11:ONLINE raidz2-2:ONLINE disk12:ONLINE disk13:ONLINE disk14:ONLINE disk15:ONLINE disk16:ONLINE disk17:ONLINE raidz2-3:ONLINE disk18:ONLINE disk19:ONLINE disk20:ONLINE disk21:ONLINE disk22:ONLINE disk23:ONLINE : md0:ONLINE : md1:ONLINE
-bash-4.2$ exit
logout
[root@io01 plugins]# su - nrpe
Last login: Wed Oct 14 09:13:45 EDT 2015 on pts/0
-bash-4.2$ /usr/lib64/nagios/plugins/check_zfs gray 3
OK ZPOOL gray : ONLINE {Size:87T Used:5.81T Avail:81.2T Cap:6%} raidz2-0:ONLINE disk0:ONLINE disk1:ONLINE disk2:ONLINE disk3:ONLINE disk4:ONLINE disk5:ONLINE raidz2-1:ONLINE disk6:ONLINE disk7:ONLINE disk8:ONLINE disk9:ONLINE disk10:ONLINE disk11:ONLINE raidz2-2:ONLINE disk12:ONLINE disk13:ONLINE disk14:ONLINE disk15:ONLINE disk16:ONLINE disk17:ONLINE raidz2-3:ONLINE disk18:ONLINE disk19:ONLINE disk20:ONLINE disk21:ONLINE disk22:ONLINE disk23:ONLINE : md0:ONLINE : md1:ONLINE
But remote execution gives an error.
[root@nagios plugins]# ./check_nrpe -H io01 -c check_zfs
CRITICAL ZPOOL {gray} does not exist and/or is not responding!
I've also verified that other commands are successful when run via NRPE.
[root@nagios plugins]# ./check_nrpe -H io01 -c check_io01_local_disks
DISK OK - free space: /dev 64360 MB (100% inode=99%); / 8686 MB (84% inode=99%);| /dev=0MB;57924;61142;0;64360 /=1551MB;9213;9725;0;10237
Can you see anything that I'm doing wrong or do you have any suggestions?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.