Nethence Newdoc Olddoc Lab Your IP BBDock  

Warning: those guides are mostly obsolete, please have a look at the new documentation.


Installing custom Nagios NRPE scripts
Disk usage custom script
Fetch your custom scripts e.g.,
cd ~/bin/
chmod +x omreport4nagios.ksh
chmod +x diskusage4nagios.bash
chmod +x
Creating custom NRPE plugins on the client
Create the plugin you want e.g. in KSH,
rpm -qa | grep ksh
cd /usr/lib64/nagios/plugins/
#cd /usr/lib/nagios/plugins/
Note. Yes, the output needs to be on one line.
Here's another one for RAM,
rpm -qa | grep ksh
cd /usr/lib64/nagios/plugins/
#cd /usr/lib/nagios/plugins/
vi check_mem.ksh
freem=`free -m`
total=`echo "$freem" | grep ^Mem | awk '{print $2}'`
used=`echo "$freem" | grep 'buffers/cache' | awk '{print $3}'`
percent=$(( $used * 100 / $total ))
#print Total memory: $total
#print Used memory: $used
if (( $percent > 92 )); then
print FAILED - $percent% used
exit 2
elif (( $percent > 79 )); then
print WARNING - $percent% used
exit 1
#all fine
print OK - $percent% used
exit 0
chmod +x check_mem.ksh
Nagios Exchange plugins
Fetch additional plugins from Nagios Exchange,
cd /root/bin/
wget --no-check-certificate -O - "" >
chmod +x

(obsolete, see the new doc)