Hello,<br><br>I am trying to get the check_by_ssh plug-in to work but seem to be having some issues<br><br>Nagios is working fine and I followed this guide to get it working in Ubuntu 7.10<br><a href="https://help.ubuntu.com/community/Nagios2">https://help.ubuntu.com/community/Nagios2</a><br>
<br>I have been following this link as my guide for check_by_ssh.<br>
<a href="https://services.ibb.gatech.edu/wiki/index.php/Howto:Software:Nagios:Check_By_SSH">https://services.ibb.gatech.edu/wiki/index.php/Howto:Software:Nagios:Check_By_SSH</a><br>
<br>The Remote server is running CentOS 5. I used the RPM package on the following link to install the plug-ins on the remote server. (Do I need the check_by_ssh plug-in to be installed on the remote server as well?)<br>
<a href="http://dag.wieers.com/rpm/packages/nagios-plugins/">http://dag.wieers.com/rpm/packages/nagios-plugins/</a><br><br>I have gotten the SSH public key working so that I can connect via SSH as the Nagios user without a password. <br>
<br>In the Nagios Web interface I see the following error:<br>(Return code of 127 is out of bounds - plugin may be missing)<br><br>In the Nagios logs I see the following error:<br>[1209068727] Warning: Return code of 127 for check of service 'SSH Check Disk' on host '<a href="http://host.domainname.com">host.domainname.com</a>' was out of bounds. Make sure the plugin you're trying to run actually exists.<br>
<br>I don't want to provide too much information right off the start. Let me know what else you need or if you have any suggestions as to what I should try. <br><br>Thank You,<br>Gavin <br><br><br>From the check_by_ssh guide in the link above this is my altered version of the script they give:<br>
<br>#!/bin/bash<br># Usage:\n cbs.sh <testname>\nPossible valid testnames: load, proc, disk, swap, user.<br>PATH="/usr/lib/nagios/plugins/check_"<br>LDOPTS="-w 15,10,5 -c 30,25,20"<br>DSKOPT="-w 20 -c 10 -p /dev/sda2"<br>
PROPTS="-w 150 -c 200"<br>SWOPTS="-w 15 -c 5"<br>USOPTS="-w 20 -c 50"<br>SSHOPT=`echo $SSH_ORIGINAL_COMMAND | { read first last; echo $last; }`<br>if [ -z $SSHOPT ]; then<br> SSHOPT=$SSH_ORIGINAL_COMMAND<br>
fi<br>case $SSHOPT in<br> load | LOAD ) RET=`${PATH}load $LDOPTS` ; x=$? ;;<br> disk | DISK ) RET=`${PATH}disk $DSKOPT` ; x=$? ;;<br> proc | PROC ) RET=`${PATH}procs $PROPTS` ; x=$? ;;<br> swap | SWAP ) RET=`${PATH}swap $SWOPTS` ; x=$? ;;<br>
user | USER ) RET=`${PATH}users $USOPTS` ; x=$? ;;<br> * ) RET="Invalid check command: $SSHOPT" ; x=2 ;;<br>esac<br>echo $RET<br>exit $x<br><br><br><br>