If you are monitoring network devices in Nagios and you get the following error:“Return code of 127 is out of bounds – plugin may be missing” Most likely you are missing some SNMP packages. Make sure you have the following:
net-snmp-libs-x.x.x net-snmp-x.x.x net-snmp-utils-x.x.x
Run this command to make sure that you don't have them:
rpm -qa | grep net-snmp
For Debian based distros:
dpkg --get-selections | grep net-snmp
If the command does not return anything, then you are missing all three packages. Proceed to install them using your package manager.
After you are done verify that the packages are installed:
# rpm -qa | grep net-snmp net-snmp-libs-5.5-37.el6_2.1.i686 net-snmp-5.5-37.el6_2.1.i686 net-snmp-utils-5.5-37.el6_2.1.i686
One last step. You will need to stop Nagios to recompile and re-install the Nagios Plug-ins.
Go to the folder where the plug-ins are downloaded.
/configure --with-nagios-user=nagios --with-nagios-group=nagios
service nagios start