NRPE: Unable to read output

Dan Langille dan at langille.org
Tue Jan 16 01:26:49 CET 2007


On 16 Jan 2007 at 1:12, Arno Lehmann wrote:

> Hi,
> 
> On 1/16/2007 12:40 AM, Dan Langille wrote:
> > On 15 Jan 2007 at 18:08, Dan Langille wrote:
> > 
> > 
> >>Hi folks,
> >>
> >>I'm using nrpe 1.9 on FreeBSD 6.x and I'm failing to get a remote 
> >>script to work.  It seems that no perl script works, but I can get 
> >>compiled plug-ins to work.
> ...
> > My thanks to bernardl for the repeated questions about what I was 
> > doing.  The solution: write a wrapper which does a cd.
> > 
> > # cat check_raid_dell_wrapper
> > #!/bin/sh
> > cd /usr/local/libexec/nagios
> > perl check_raid_dell
> > 
> > Then refer to the wrapper in the nrpe.cfg on the remote server:
> > 
> > # grep dell /usr/local/etc/nrpe.cfg
> > command[check_raid_dell]=/usr/local/libexec/nagios/check_raid_dell_wra
> > pper
> 
> Interesting. Should be possible to invoke the check script directly, 
> though. You can call it with its path, it should have a hash bang line, 
> and the necessary inclusion of utils.pm could be handled from inside the 
> script. Which, incidentially, is how the standard plugins I know work :-)
> 
> But a wrapper is often the solution to plugin problems...


We write that, with the full path.  That is what led us to the 
wrapper solution:

# su -m -c nagios nagios c 
"/usr/local/libexec/nagios/check_raid_dell"
Can't locate utils.pm in @INC (@INC contains: nagios 
/usr/local/lib/perl5/5.8.8/BSDPAN 
/usr/local/lib/perl5/site_perl/5.8.8/mach 
/usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl 
/usr/local/lib/perl5/5.8.8/mach /usr/local/lib/perl5/5.8.8 .) at 
/usr/local/libexec/nagios/check_raid_dell line 17.
BEGIN failed--compilation aborted at 
/usr/local/libexec/nagios/check_raid_dell line 17.
#


-- 
Dan Langille : Software Developer looking for work
my resume: http://www.freebsddiary.org/dan_langille.php
PGCon - The PostgreSQL Conference - http://www.pgcon.org/



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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