NRPE: Unable to read output

Arno Lehmann al at its-lehmann.de
Tue Jan 16 01:12:53 CET 2007


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

Arno

> NOTE the use of the wrapper path
> 
> Restart nrpe on the remote box and then test it on the server:
> 
> 
> $ ./check_nrpe -H app09 -c check_raid_dell
> RAID_DELL CRITICAL: RAID is critical.
> 
> \o/
> 
> cheers
> 
> 

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