[Nagiosplug-devel] plugin works locally but not remotely
Thomas Guyot-Sionnest
Thomas at zango.com
Thu Nov 23 06:49:46 CET 2006
Make sure the path to utils.pm in check_mailq is right, then try one of the following:
If you can reproduce the problem locally, run the problematic command with:
"strace -f <full command>"
It it only happens trough NRPE, disable active checks to that host, find the pid of the nrpe daemon and run:
"strace -fp <nrpe pid>"
In either case try to follow the systems calls. Look for an error like permission denied opening a file or a file not found. I know the output is awfully long (especially with Perl checks) but you'll likely find exactly where it's failing.
Thomas
-----Original Message-----
From: nagiosplug-devel-bounces at lists.sourceforge.net on behalf of Gary W. Smith
Sent: Thu 23-Nov-06 0:35
To: nagiosplug-devel at lists.sourceforge.net
Subject: [Nagiosplug-devel] plugin works locally but not remotely
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/c18b15d4/attachment.html>
More information about the Devel
mailing list