[Nagiosplug-devel] plugin works locally but not remotely

Gary W. Smith gary at primeexalia.com
Thu Nov 23 06:35:53 CET 2006


I have two servers, one redhat, one rpath os, both running nrpe.  These
are postfix mail spoolers.  The check_nrpe command from the nagios
servers works fine on the redhat server but dies on the rpath server
(only for the check_mailq command).

When I run the check_mailq command on the local rpath box it runs
without any problem.  I can't tell why it's dying remotely BUT when I
wrap the check_mailq command with a shell it works fine remotely.

So I renamed check_mailq to check_mailq.pl and create check_mailq (shell
script) which does this: 

#!/bin/sh
# Nasty fix for some off the wall reason
cd /usr/lib/nagios/plugins
/usr/lib/nagios/plugins/check_mailq.pl $1 $2 $3 $4 $5 $6

I'm not sure why I have to write a wrapper.  Anyone seem anything like
this on different distros?  I had to put the cd /usr/lib/nagios/plugins
in there or it would die on the call to
/usr/lib/nagios/plugins/check_mailq.pl $1 $2 $3 $4 $5 $6.

Any help would be appreciated.

Gary Wayne Smith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nagios-plugins.org/archive/devel/attachments/20061122/5b242388/attachment.html>


More information about the Devel mailing list