Archive

Archive for October, 2014

Adding check-multipath.pl to Nagios

October 31, 2014 Leave a comment

# Download script from here:
http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check-2Dmultipath-2Epl/details

# cp check-multipath.pl /usr/local/nagios/libexec/

# Edit sudoers to allow for nagios user to run commands:
nagios ALL= NOPASSWD: MULTIPATH
Cmnd_Alias MULTIPATH=/sbin/multipath -l

# Edit nrpe.cfg:
command[check_multipath]=/usr/local/nagios/libexec/check-multipath.pl

# Modify services.cfg in Nagios directory to include new script
# service nagios reload

# check_nrpe -n -H -c check_multipath

# Sample output
# /usr/local/nagios/libexec/check_nrpe -n -H hostA -c check_multipath
OK
LUN mpathm: 4/4.
LUN VOTE3: 4/4.
LUN VOTE2: 4/4.
LUN VOTE1: 4/4.
LUN OCRVOTE: 4/4.
LUN LUN105: 4/4.
LUN LUN104: 4/4.
LUN LUN103: 4/4.
LUN LUN102: 4/4.
LUN LUN101: 4/4.
LUN LUN100: 4/4.

Categories: Linux, Redhat