<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=big5">
<META content="MSHTML 6.00.2800.1458" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>I write the following plugin in "expect". It runs
sucessfully in shell, but it shows "No output" when I integrated it with
nagios.</FONT></DIV>
<DIV><FONT size=2>Can I write the nagios plugins in "expect" ? If Yes, how
to change it. Thanks !</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>#!/usr/bin/expect<BR>spawn ssh -l xxxx xx.xx.xx.xx
"/opt/ecs/bin/almsummary"<BR>expect -re "Password: "<BR>send
"xxxxxxxx\rr"<BR>expect eof<BR>set output $expect_out(buffer)<BR>#puts
$output<BR>if [ string match "*Yes*" $output ] {<BR> puts
"ACD:CRITICAL\n";<BR> set exitstatus 1<BR>} else {<BR>
puts "ACD:OK\n";<BR> set exitstatus 0<BR>}<BR>exit
$exitstatus<BR></DIV></FONT></BODY></HTML>