/var/log/messages
[1384790804] INITIAL SERVICE STATE: callme-lekki-billing1;FANs status;UNKNOWN;HARD;3;UNKNOWN: Error in pexpect while running hpasmcli
[1384790804] INITIAL SERVICE STATE: callme-lekki-billing1;FANs status;UNKNOWN;HARD;3;UNKNOWN: Error in pexpect while running hpasmcli
Do you have pexpect?# 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
but when I run hpasmcli locally on all 4 - the answer is as it should be./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.
all 4 servers havenagios 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
and all 4 PC have nrpe_user=nagios-rwxr-xr-x 1 nagios nagios 13772 Nov 13 20:58 check_proliant.py
Code: Select all
getenforceand I have /usr/lib64/nagios/plugins/ directory pexpect.py[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
-rwxr-xr-x 1 nagios nagios 75937 Nov 15 22:18 pexpect.py