Antwort: RE: script giving plugin missing error.
h.baecker at ecofis.de
h.baecker at ecofis.de
Tue Mar 2 14:02:52 CET 2004
Hi Prabhu,
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?
Regards
Hendrik
<prabhu.anandh at wipro.com>
Gesendet von: nagios-users-admin at lists.sourceforge.net
02.03.2004 13:48
An
<fredrik.wanglund at mobeon.com>
Kopie
<nagios-users at lists.sourceforge.net>
Thema
RE: [Nagios-users] script giving plugin missing error.
Hi fredrik,
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.
Any ideas of how to solve the problem.i have given the full path for
new.pl ,but it is not working.
If I try to execute manually by changing the $HOSTADDRESS in shell script
with the exact address,it create out file.otherwise not????????why??
Thanks in advance.
regards,
Prabhu Anandh S.
-----Original Message-----
From: Fredrik Wänglund [mailto:fredrik.wanglund at mobeon.com]
Sent: Tuesday, March 02, 2004 5:28 PM
To: Prabhu Anandh (WT01 - TELECOM & INTER-NETWORKING SOLUTIONS)
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] script giving plugin missing error.
The problem is the line './new.pl'
Nagios is not executed from the libexec-directory, so you need the full
path to the secondary script (and to the outfile).
/FredrikW
prabhu.anandh at wipro.com wrote:
> Hi folks this is what I tried and I get the following error
> (127 out of bounds plugin may be missing.)<---from status.log file
>
> This is the shell script that invokes perl script since I don't know
> how to check strings in shell script.
>
> #!/bin/sh
> RES1= `/bin/ping -c 2 -w 2 $HOSTADDRESS > out` <-----------------I am
> sending only 2 packets.
> RET=$?
> echo $RES1
> ./new.pl
> exit $RET
>
> Perl script reads as follows:
>
> #!/usr/bin/perl
> open (FILE,"<out");
> while(<FILE>)
> {
> if ($_ =~ /0 received/) <-----------------if no packets are
> received ,I will give it as critical or warning.
> {
> print ("CRITICAL - Plugin timed out after 10 seconds\n");
> }
> if ($_=~ /2 received/) <-------------if both are received ,I
> assume that host is up.
> {
> print ("PING -OK\n");
> }
> }
> #print "$_";
> close (FILE);
>
>
> In hosts.cfg
> I have given check_command as check_new <----name of the shell file.
>
> In checkcommands.cfg
> Command_line /home/var/check_new $HOSTADDRESS
>
>
> How do I make the following to take effect in the web interface. Or
> where and what mistake I did.
>
> Thanks in advance.
>
> Regards,
> Prabhu Anandh
>
>
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and
> deploy apps & Web services for Linux with a free DVD software kit from
> IBM. Click Now! http://ads.osdn.com/?ad_id56&alloc_id438&op=click
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&opÌk
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040302/a38af318/attachment.html>
More information about the Users
mailing list