script giving plugin missing error.

Fredrik Wänglund fredrik.wanglund at mobeon.com
Tue Mar 2 12:57:58 CET 2004


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_id=1356&alloc_id=3438&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





More information about the Users mailing list