Page 1 of 2

nrpe check_proliant

Posted: Mon Nov 18, 2013 11:12 am
by vvz
for and only plugin check_proliant not able to get info :
/var/log/messages
[1384790804] INITIAL SERVICE STATE: callme-lekki-billing1;FANs status;UNKNOWN;HARD;3;UNKNOWN: Error in pexpect while running hpasmcli

Re: nrpe check_proliant

Posted: Mon Nov 18, 2013 11:13 am
by vvz
did somebody meet this problem?
If you need some more info let me know

Re: nrpe check_proliant

Posted: Mon Nov 18, 2013 11:45 am
by abrist
From the plugin source:
# Python script for Nagios
# check hpasm/hplog fans and power
#
# Requires: /sbin/hpasmcli, pexpect
#
# Note: This uses the thresholds that HPLOG reports to determine OK or CRITICAL for temperatures
#
# This script requires the pexpect module which is Expect implemented in pure python.
# it can be obtained from: http://www.noah.org/wiki/Pexpect (or SourceForge.net)

#
# NOTE: Nagios must have the ability to run hpasmcli as root via sudo. You can do this
# by adding the following line to /etc/sudoers, assuming the nagios user is 'nagios':
# nagios ALL=(ALL) NOPASSWD: /sbin/hpasmcli
Do you have pexpect?

Re: nrpe check_proliant

Posted: Mon Nov 18, 2013 12:45 pm
by vvz
yes, I have

the problem solved, I changed
in nrpe.cfg file nrpe_user=nagios nrpe_group=nagios
on default they are = nrpe

Re: nrpe check_proliant

Posted: Mon Nov 18, 2013 12:47 pm
by slansing
They should not be nrpe by default, out of curiosity how did you install NRPE?

Re: nrpe check_proliant

Posted: Mon Nov 18, 2013 4:11 pm
by vvz
I followed this link http://sharadchhetri.com/2013/03/02/how ... d-red-hat/
and as you can see there he also has nrpe as default in his nrpe.cfg

Re: nrpe check_proliant

Posted: Mon Nov 18, 2013 4:28 pm
by abrist
Ahhh, the official docs are different than that link. Glad it is resolved. Is this thread lock-ready?

Re: nrpe check_proliant

Posted: Mon Nov 18, 2013 4:38 pm
by vvz
Sorry guys, I was happy too early
I have now the next problem

I'm installing nrpe+check_proliant.py on 4 hp servers.
2 of them works just fine , but on the other two I got this answer running check_proliant.py locally.
./check_proliant.py --type=fan
CRITICAL: Fan #1 Status=No. Fan #1 Speed=-. Fan #1 Redundant=N/A. Fan #2 Status=No. Fan #2 Speed=-. Fan #2 Redundant=N/A.
but when I run hpasmcli locally on all 4 - the answer is as it should be

I can't see any difference between 4 machines. All sudoers have nagios user to run check_proliant.py with no password, like this
nagios ALL=(ALL) NOPASSWD:/sbin/hpasmcli
nagios ALL=(ALL) NOPASSWD:/usr/lib64/nagios/plugins/*
nagios ALL=(ALL) NOPASSWD:/usr/lib64/nagios/plugins/check_proliant.py
Defaults:nagios !requiretty
all 4 servers have
-rwxr-xr-x 1 nagios nagios 13772 Nov 13 20:58 check_proliant.py
and all 4 PC have nrpe_user=nagios
nrpe_group=nagios in nrpe.cfg

could you give me the way to dig?
Thank you

Re: nrpe check_proliant

Posted: Mon Nov 18, 2013 4:40 pm
by abrist
On one of the problem servers, try running the check locally as root.
Are the permissions the same on the hpasmcli utility?
Is selinux enabled?

Code: Select all

getenforce

Re: nrpe check_proliant

Posted: Mon Nov 18, 2013 4:54 pm
by vvz
give me a sec, I'll check

yes
hpasmcli in the same direcotry on all pc's /sbin

all have /sbin in PATH
[vassiliy@callme-lekki-billing2 plugins]$ echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/opt/cassandra/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
and I have /usr/lib64/nagios/plugins/ directory pexpect.py
-rwxr-xr-x 1 nagios nagios 75937 Nov 15 22:18 pexpect.py