nrpe check_proliant

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

nrpe check_proliant

Post 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
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: nrpe check_proliant

Post by vvz »

did somebody meet this problem?
If you need some more info let me know
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: nrpe check_proliant

Post 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?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: nrpe check_proliant

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: nrpe check_proliant

Post by slansing »

They should not be nrpe by default, out of curiosity how did you install NRPE?
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: nrpe check_proliant

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: nrpe check_proliant

Post by abrist »

Ahhh, the official docs are different than that link. Glad it is resolved. Is this thread lock-ready?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: nrpe check_proliant

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: nrpe check_proliant

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: nrpe check_proliant

Post 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
Last edited by slansing on Mon Nov 18, 2013 5:50 pm, edited 1 time in total.
Reason: Removed your last posts and combined them together, do not double post, edit your previous post.
Locked