Anyone use Nagios? Need some help.

Kanwar Ranbir Sandhu m3freak at rogers.com
Tue Jul 27 03:18:46 UTC 2004


On Mon, 2004-07-26 at 17:05, Rick Stevens wrote:
> Are you running this as your mortal self or as root?

I've looked into both suggestions offered so far (btw, thanks to the
both of you).

I'm running the check_rpc plugin as root, and as the nagios user, but
the result is the same.

I've also checked what the $PATH environment variable is for the nagios
user:

PATH=/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin

The login shell for nagios is "/bin/sh".

I tried creating a ".bash_profile" file for the nagios user and set the
$PATH variable as "PATH=$PATH:/usr/sbin", but that didn't do the trick
either.

The plugin has to run as the nagios user, so I can't do anything about
that.  Perhaps there is something I can change in the plugin script. 
It's written in Perl, and I of course don't know anything about Perl.  I
did see a few lines that look interesting though:

$ENV{'BASH_ENV'}='';
$ENV{'ENV'}='';
$ENV{'PATH'}='';

I've tried changing the last line to "$ENV{'PATH'}='/usr/sbin';", but
that didn't work.  I was just fumbling around though.

Is there something obvious I'm missing or not doing?

Thanks in advance,

Ranbir

-- 
Ranbir
Systems Aligned Inc.
www.systemsaligned.com





More information about the fedora-list mailing list