NRPE: Unable to read output

Arno Lehmann al at its-lehmann.de
Tue Jan 16 02:06:04 CET 2007


Hi,

On 1/16/2007 1:26 AM, Dan Langille wrote:
> 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.
> #
> 

Well, I'm not a perl guru, but in the standard plugins I looked at I 
have a line "use lib "/usr/local/nagios2/libexec"  ;" which looks like 
it is important for cases like yours...

Arno


-- 
IT-Service Lehmann                    al at its-lehmann.de
Arno Lehmann                  http://www.its-lehmann.de

-------------------------------------------------------------------------
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