<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6472.0">
<TITLE>Using check_by_ssh and the ssh_disk command</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hello,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I am trying to use the check_by _ssh plugin to check disk space on a server. In the command.cfg file there is a command named ssh_disk, I am trying to use this example to check the /var directory. </FONT></P>
<P><FONT SIZE=2 FACE="Arial">Here is the entry in the command .cfg file: </FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">command[ssh_disk]=/usr/lib/nagios/plugins/check_by_ssh -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_disk -w 85% -c 95% -p $ARG1$'</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Here is the entry form the services.cfg file:</FONT>
<BR><FONT SIZE=2 FACE="Arial"> </FONT>
<BR><FONT SIZE=2 FACE="Arial"># Service definition</FONT>
<BR><FONT SIZE=2 FACE="Arial">define service{</FONT>
<BR><FONT SIZE=2 FACE="Arial"> use generic-service ; Name of service template to use</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"> host_name nypptd.platts.mcgraw-hill.com</FONT>
<BR><FONT SIZE=2 FACE="Arial"> service_description /var</FONT>
<BR><FONT SIZE=2 FACE="Arial"> is_volatile 0</FONT>
<BR><FONT SIZE=2 FACE="Arial"> check_period 24x7</FONT>
<BR><FONT SIZE=2 FACE="Arial"> max_check_attempts 3</FONT>
<BR><FONT SIZE=2 FACE="Arial"> normal_check_interval 5</FONT>
<BR><FONT SIZE=2 FACE="Arial"> retry_check_interval 1</FONT>
<BR><FONT SIZE=2 FACE="Arial"> contact_groups oracle11i-admins</FONT>
<BR><FONT SIZE=2 FACE="Arial"> notification_interval 240</FONT>
<BR><FONT SIZE=2 FACE="Arial"> notification_period 24x7</FONT>
<BR><FONT SIZE=2 FACE="Arial"> notification_options c,r</FONT>
<BR><FONT SIZE=2 FACE="Arial"> check_command ssh_disk!/var</FONT>
<BR><FONT SIZE=2 FACE="Arial"> }</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Here is the entry from the checkcommands.cfg file:</FONT>
<BR><FONT SIZE=2 FACE="Arial"># 'check_by_ssh' DISK command definition</FONT>
<BR><FONT SIZE=2 FACE="Arial">define command{</FONT>
<BR><FONT SIZE=2 FACE="Arial"> command_name ssh_disk</FONT>
<BR><FONT SIZE=2 FACE="Arial"> command_line $USER1$/ssh_disk $ARG1$</FONT>
<BR><FONT SIZE=2 FACE="Arial"> }</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">After making these entries and restarting Nagios I get the</FONT> <FONT FACE="Times New Roman">(Return code of 127 is out of bounds - plugin may be missing) error.</FONT></P>
<P><FONT FACE="Times New Roman">Please let me know if I am doing something wronge. I am new to Nagios so that is probably the case. I would appreciated any help you can give me.</FONT></P>
<P><FONT FACE="Times New Roman">Thank you,</FONT>
<BR><FONT SIZE=2 FACE="Arial">Alan DeBekker</FONT>
<BR><FONT SIZE=2 FACE="Arial">Platts Technology</FONT>
<BR><FONT SIZE=2 FACE="Arial">212-904-3028</FONT>
</P>
</BODY>
</HTML>