[Nagiosplug-help] check_by_ssh passing wrong return code
Craig Carlton
ccarlton at apple.com
Thu Mar 13 17:55:00 CET 2008
Anyone have any ideas why this is happening?:
SERVER:nagios root# /usr/local/nagios/libexec/check_by_ssh -H TARGET -
i /etc/nagios/.ssh/id_dsa -t 15 -f -o StrictHostKeyChecking=no -o
BatchMode=yes -o ChallengeResponseAuthentication=no -o
ConnectionAttempts=3 -o ConnectTimeout=10 -C '/ngs/app/chatboxp/
libexec/check_ntp -H time.apple.com -w 180 -c 300 -t 15' -l USER -q
NTP CRITICAL: Offset 28876.80561 secs|offset=28876.805611s;
180.000000;300.000000;
SERVER:nagios root# echo $?
0
Individual command works fine on the box in question:
TARGET:~ USER$ /ngs/app/chatboxp/libexec/check_ntp -H time.apple.com -
w 180 -c 300 -t 15
NTP CRITICAL: Offset 28876.82569 secs|offset=28876.825690s;
180.000000;300.000000;
TARGET:~ USER$ echo $?
2
check_by_ssh returns "NTP CRITICAL" however the return code is zero so
the alarm never gets triggered.
More information about the Help
mailing list