<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hello All,<br>
  <br>

<div align="left">I have the following script created to check free space on a remote legacy box via rsh. <br>
  <br>
used=`sudo rsh $1 df -v |grep starlite6 | head -1 | awk '{print $4}'`<br>
free=`sudo rsh $1 df -v |grep starlite6 | head -1 | awk '{print $5}'`<br>
full=`echo $(($used+$free))`<br>
percent=`echo $((( $free * 100 ) / $full))`<br>
warn=`echo $((( $full * $2 ) / 100 ))`<br>
crit=`echo $((( $full * $3 ) / 100 ))`<br>
  <br>
if [ "$warn" -gt "$crit" -o "$warn" -eq "$crit" ]; then<br>
  echo "Unknown: [crit] must be larger than [warn]"<br>
      exit 3<br>
  <br>
fi<br>
  <br>
if [ "$used" -lt "$warn" -o "$used" -eq "$warn" ]; then<br>
  <br>
      echo "OK. Free Space: `sudo rsh $1 df -v |grep starlite6 |head -1 | awk<br>
'{print $5}'`B, $percent%"<br>
exit 0<br>
elif [ "$used" -gt "$warn" -a "$used" -lt "$crit" ]; then<br>
      echo "Warning. Free Space: `sudo rsh $1 df -v |grep starlite6 | head -1 |<br>
awk '{print $5}'`B, $percent%"<br>
     exit 1<br>
elif [ "$used" -gt "$crit" ]; then<br>
      echo "Critical. Free Space: `sudo rsh $1 df -v |grep starlite6 | head -1 |<br>
 awk '{print $5}'`B, $percent%"<br>
     exit 2<br>
 else<br>
   echo "Unknown"<br>
  exit 3<br>
fi<br>
  <br>
 If I run this from the command line, I get the following response:<br>
  <br>
/usr/local/nagios/libexec # ./check_starlite_size LEGACYBOX 70 80<br>
Critical. Free Space: 51090B, 2%<br>
  <br>
if nagios runs the script , I keep getting an unknown result on the central server ( distributed environment btw) <br>
from nagios.log on central server:<br>
[1287511053] PASSIVE SERVICE CHECK: strXXXXsa;Starlite Size;3;Unknown<br>
  <br>
I assume that the issue is an incorrect format for the send_nsca file but cant figure out how to set it up correctly. I have the check added on the distributed server & the central server in command.cfg & services.cfg and the check does run so I assume its correct from that aspect, just not an expected format/info ..<br>
  <br>
Can anyone tell me what I am missing here ?<br>Thanks,<br>Steve<br></div>                                         </body>
</html>