<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Message</TITLE>
<META content="MSHTML 5.50.4933.1800" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=898021613-02032004><FONT face=Arial color=#0000ff size=2>hi
hendrik,</FONT></SPAN></DIV>
<DIV><SPAN class=898021613-02032004><FONT face=Arial color=#0000ff size=2>I am
running in root only.and for your information if i run that script manually i
get the output.the problem i beleive that i have is ,if i given the
hostaddress in checkcommands.cfg and i have made no provision for getting this
variable in my script maybe this causes problems.any ideas??????? will it be the
problem???but even if i type the address manually in the script and then
run nagios........it still doesnt work. i have given the full path for every
check_new(shell script), new.pl and also for out file.</FONT></SPAN></DIV>
<DIV><SPAN class=898021613-02032004><FONT face=Arial color=#0000ff size=2>if i
run manually the script alone,it works.strange...........</FONT></SPAN></DIV>
<DIV><SPAN class=898021613-02032004><FONT face=Arial color=#0000ff size=2>thanks
in advance.</FONT></SPAN></DIV>
<DIV align=left><FONT face=Arial size=2></FONT> </DIV>
<DIV align=left><FONT face=Arial size=2><STRONG>regards,</STRONG></FONT></DIV>
<DIV align=left><STRONG><FONT face=Arial size=2>Prabhu Anandh
S.</FONT></STRONG></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
nagios-users-admin@lists.sourceforge.net
[mailto:nagios-users-admin@lists.sourceforge.net] <B>On Behalf Of
</B>h.baecker@ecofis.de<BR><B>Sent:</B> Tuesday, March 02, 2004 6:33
PM<BR><B>To:</B> Prabhu Anandh (WT01 - TELECOM & INTER-NETWORKING
SOLUTIONS); nagios-users@lists.sourceforge.net<BR><B>Subject:</B> Antwort: RE:
[Nagios-users] script giving plugin missing
error.<BR><BR></FONT></DIV><BR><FONT face=sans-serif size=2>Hi Prabhu,</FONT>
<BR><BR><FONT face=sans-serif size=2>Did you try to execute your script as
"nagios-user" or just as root? Perhaps the nagios user is not permitted to
write files in the working directory of your script?</FONT> <BR><BR><FONT
face=sans-serif size=2>Regards</FONT> <BR><FONT face=sans-serif
size=2>Hendrik</FONT> <BR><BR><BR><BR><BR>
<TABLE width="100%">
<TBODY>
<TR vAlign=top>
<TD width="40%"><FONT face=sans-serif
size=1><B><prabhu.anandh@wipro.com></B> </FONT><BR><FONT
face=sans-serif size=1>Gesendet von:
nagios-users-admin@lists.sourceforge.net</FONT>
<P><FONT face=sans-serif size=1>02.03.2004 13:48</FONT> </P>
<TD width="59%">
<TABLE width="100%">
<TBODY>
<TR>
<TD>
<DIV align=right><FONT face=sans-serif size=1>An</FONT></DIV>
<TD vAlign=top><FONT face=sans-serif
size=1><fredrik.wanglund@mobeon.com></FONT>
<TR>
<TD>
<DIV align=right><FONT face=sans-serif size=1>Kopie</FONT></DIV>
<TD vAlign=top><FONT face=sans-serif
size=1><nagios-users@lists.sourceforge.net></FONT>
<TR>
<TD>
<DIV align=right><FONT face=sans-serif size=1>Thema</FONT></DIV>
<TD vAlign=top><FONT face=sans-serif size=1>RE: [Nagios-users]
script giving plugin missing error.</FONT></TR></TBODY></TABLE><BR>
<TABLE>
<TBODY>
<TR vAlign=top>
<TD>
<TD></TR></TBODY></TABLE><BR></TR></TBODY></TABLE><BR><BR><BR><FONT
size=2><TT>Hi fredrik,<BR>I have checked it and the problem is not with the
nagios.when it tries to execute check_new and the shell script does not create
the "out " file.<BR>Any ideas of how to solve the problem.i have given the
full path for new.pl ,but it is not working.<BR>If I try to execute manually
by changing the $HOSTADDRESS in shell script with the exact address,it create
out file.otherwise not????????why??<BR>Thanks in
advance.<BR><BR>regards,<BR>Prabhu Anandh S.<BR><BR><BR>-----Original
Message-----<BR>From: Fredrik Wänglund [mailto:fredrik.wanglund@mobeon.com]
<BR>Sent: Tuesday, March 02, 2004 5:28 PM<BR>To: Prabhu Anandh (WT01 - TELECOM
& INTER-NETWORKING SOLUTIONS)<BR>Cc:
nagios-users@lists.sourceforge.net<BR>Subject: Re: [Nagios-users] script
giving plugin missing error.<BR><BR><BR>The problem is the line
'./new.pl'<BR><BR>Nagios is not executed from the libexec-directory, so you
need the full <BR>path to the secondary script (and to the
outfile).<BR><BR>/FredrikW<BR><BR><BR><BR>prabhu.anandh@wipro.com
wrote:<BR><BR>> Hi folks this is what I tried and I get the following
error<BR>> (127 out of bounds plugin may be missing.)<---from status.log
file<BR>> <BR>> This is the shell script that invokes perl script since
I don't know <BR>> how to check strings in shell script.<BR>> <BR>>
#!/bin/sh<BR>> RES1= `/bin/ping -c 2 -w 2 $HOSTADDRESS > out`
<-----------------I am<BR>> sending only 2 packets.<BR>>
RET=$?<BR>> echo $RES1<BR>> ./new.pl<BR>> exit $RET<BR>> <BR>>
Perl script reads as follows:<BR>> <BR>> #!/usr/bin/perl<BR>> open
(FILE,"<out");<BR>> while(<FILE>)<BR>> {<BR>> if ($_ =~ /0
received/) <-----------------if no
packets are<BR>> received ,I will give it as critical or warning.<BR>>
{<BR>> print ("CRITICAL - Plugin timed out after 10 seconds\n");<BR>>
}<BR>> if ($_=~ /2 received/)
<-------------if both are received ,I<BR>> assume that host is
up.<BR>> {<BR>> print ("PING -OK\n");<BR>> }<BR>> }<BR>> #print
"$_";<BR>> close (FILE);<BR>> <BR>> <BR>> In hosts.cfg<BR>> I
have given check_command as check_new <----name of the shell file.<BR>>
<BR>> In checkcommands.cfg<BR>> Command_line /home/var/check_new
$HOSTADDRESS<BR>> <BR>> <BR>> How do I make the following to take
effect in the web interface. Or <BR>> where and what mistake I did.<BR>>
<BR>> Thanks in advance.<BR>> <BR>> Regards,<BR>> Prabhu
Anandh<BR>> <BR>> <BR>>
-------------------------------------------------------<BR>> SF.Net is
sponsored by: Speed Start Your Linux Apps Now. Build and <BR>> deploy apps
& Web services for Linux with a free DVD software kit from <BR>> IBM.
Click Now! http://ads.osdn.com/?ad_id56&alloc_id438&op=click<BR>>
_______________________________________________<BR>> Nagios-users mailing
list<BR>> Nagios-users@lists.sourceforge.net<BR>>
https://lists.sourceforge.net/lists/listinfo/nagios-users<BR>> ::: Please
include Nagios version, plugin version (-v) and OS when reporting any issue.
<BR>> ::: Messages without supporting info will risk being sent to
/dev/null<BR><BR><BR><BR>-------------------------------------------------------<BR>SF.Net
is sponsored by: Speed Start Your Linux Apps Now.<BR>Build and deploy apps
& Web services for Linux with<BR>a free DVD software kit from IBM. Click
Now!<BR>http://ads.osdn.com/?ad_id56&alloc_id438&opĚk<BR>_______________________________________________<BR>Nagios-users
mailing
list<BR>Nagios-users@lists.sourceforge.net<BR>https://lists.sourceforge.net/lists/listinfo/nagios-users<BR>:::
Please include Nagios version, plugin version (-v) and OS when reporting any
issue. <BR>::: Messages without supporting info will risk being sent to
/dev/null<BR><BR><BR></TT></FONT><BR></BLOCKQUOTE></BODY></HTML>