Nrpe on Sol 10 - Permission denied

Hi all,

I have nrpe Version: 2.12 on Solaris 10 and am having a problem.

It seems that I can’t use check_disk via nrpe with some directories.

On remote host, I have:

nrpe.conf:
command[check_logs_oracle]=/usr/local/nagios/libexec/check_disk -w 10% -c 5% -p /psoft/logs/oracle

and that command works from the command line:

/usr/local/nagios/libexec/check_disk -w 10% -c 5% -p /psoft/logs/oracle

DISK OK - free space: /psoft/logs/oracle 3976 MB (99% inode=98%);| /psoft/logs/oracle=14MB;3627;3829;0;4031

but on nagios server, when I run check_nrpe:

./check_nrpe -n -H -c check_logs_oracle

DISK CRITICAL - /psoft/logs/oracle is not accessible: Permission denied

It works for some directories, not for others.

nrpe.conf:
command[check_oracle]=/usr/local/nagios/libexec/check_disk -w 10% -c 5% -p /psoft/oracle

nagios server:
root@stvpora02 # ./check_nrpe -n -H -c check_oracle
DISK OK - free space: /psoft/oracle 9231 MB (46% inode=99%);| /psoft/oracle=10726MB;18143;19151;0;20159

Almost all of the file systems that do not work are at least 3 directories deep. There is one that works, so it doesn’t appear to be a matter of how deep the file systems are mounted.

Any help would be appreciated.

Some more strangeness… I did some more testing and found that there appears to be a limitation on check_nrpe.

When I do this from a script ran via check_nrpe:

MYRESULT=/usr/sbin/df -k
echo $MYRESULT

It only returns a portion of the output. Even if I do:

MYRESULT=/usr/sbin/df -k /psoft/logs/oracle
echo $MYRESULT

if that directory is after the cutoff point, it won’t get returned, and MYRESULT will be empty.

I would have thought the processing gets done on the server side, so a df -k /psoft/logs/oracle would just return that partition. This doesn’t seem to be the case though.