check_blackberry5 and error (Return code of 127)
Re: check_blackberry5 and error (Return code of 127)
[root@Mis1SmMo02 ~]# cd /usr/local/nagios/libexec
[root@Mis1SmMo02 libexec]# ./check_blackberry5 -H 172.16.***.*** -C ddgpublic -Q pending -w 10 -c 20
-bash: ./check_blackberry5: Permission denied
[root@Mis1SmMo02 libexec]#
This is what happens when I run it as root.
[root@Mis1SmMo02 libexec]# ./check_blackberry5 -H 172.16.***.*** -C ddgpublic -Q pending -w 10 -c 20
-bash: ./check_blackberry5: Permission denied
[root@Mis1SmMo02 libexec]#
This is what happens when I run it as root.
Re: check_blackberry5 and error (Return code of 127)
Please run
ls -l /usr/local/nagios/libexec/check_blackberry5
and share the output
ls -l /usr/local/nagios/libexec/check_blackberry5
and share the output
Former Nagios employee
Re: check_blackberry5 and error (Return code of 127)
when run as root....
[root@Mis1SmMo02 libexec]# ./check_blackberry5 -H 172.16.***.*** -C ddgpublic -Q pending -w 10 -c 20
-bash: ./check_blackberry5: Permission denied
[root@Mis1SmMo02 libexec]# ./check_blackberry5 -H 172.16.***.*** -C ddgpublic -Q pending -w 10 -c 20
-bash: ./check_blackberry5: Permission denied
Re: check_blackberry5 and error (Return code of 127)
That's not the command I asked you to run. Please run:
ls -l /usr/local/nagios/libexec/check_blackberry5
ls -l /usr/local/nagios/libexec/check_blackberry5
Former Nagios employee
Re: check_blackberry5 and error (Return code of 127)
[root@Mis1SmMo02 ~]# ls -l /usr/local/nagios/libexec/check_blackberry5
-rw-r--r-- 1 nagios users 4465 Jan 29 14:54 /usr/local/nagios/libexec/check_blackberry5
[root@Mis1SmMo02 ~]#
-rw-r--r-- 1 nagios users 4465 Jan 29 14:54 /usr/local/nagios/libexec/check_blackberry5
[root@Mis1SmMo02 ~]#
Re: check_blackberry5 and error (Return code of 127)
There's your problem. Nobody has permission to execute the plugin.
chmod 755 /usr/local/nagios/libexec/check_blackberry5
and it should work
chmod 755 /usr/local/nagios/libexec/check_blackberry5
and it should work
Former Nagios employee
Re: check_blackberry5 and error (Return code of 127)
[root@Mis1SmMo02 libexec]# ls -l /usr/local/nagios/libexec/check_blackberry5
-rwxr-xr-x 1 nagios users 4465 Jan 29 14:54 /usr/local/nagios/libexec/check_blackberry5
[root@Mis1SmMo02 libexec]# ./check_blackberry5 -H 172.16.***.*** -C ddgpublic -Q pending -w 10 -c 20
-bash: ./check_blackberry5: /bin/bash^M: bad interpreter: No such file or directory
[root@Mis1SmMo02 libexec]#
-rwxr-xr-x 1 nagios users 4465 Jan 29 14:54 /usr/local/nagios/libexec/check_blackberry5
[root@Mis1SmMo02 libexec]# ./check_blackberry5 -H 172.16.***.*** -C ddgpublic -Q pending -w 10 -c 20
-bash: ./check_blackberry5: /bin/bash^M: bad interpreter: No such file or directory
[root@Mis1SmMo02 libexec]#
Re: check_blackberry5 and error (Return code of 127)
Same issue we tackled back on the first page:
Run the following and try it again. In order to type the ^M character, hold CTRL and pres v then m:
sed 's/^M//g' check_blackberry5 > check_blackberry5.new
mv check_blackberry5.new check_blackberry5
Run the following and try it again. In order to type the ^M character, hold CTRL and pres v then m:
sed 's/^M//g' check_blackberry5 > check_blackberry5.new
mv check_blackberry5.new check_blackberry5
Former Nagios employee
Re: check_blackberry5 and error (Return code of 127)
Ok, getting closer....
[root@Mis1SmMo02 libexec]# ./check_blackberry5 -H 172.16.***.*** -C ddgpublic -Q pending -w 10 -c 20
Timeout: No Response from 172.16.124.149
./check_blackberry5: line 82: [: : integer expression expected
./check_blackberry5: line 86: [: : integer expression expected
OK: Pending Mails: |Pending=;10;20;;
Not sure that the below two lines are correct.
./check_blackberry5: line 82: [: : integer expression expected
./check_blackberry5: line 86: [: : integer expression expected
[root@Mis1SmMo02 libexec]# ./check_blackberry5 -H 172.16.***.*** -C ddgpublic -Q pending -w 10 -c 20
Timeout: No Response from 172.16.124.149
./check_blackberry5: line 82: [: : integer expression expected
./check_blackberry5: line 86: [: : integer expression expected
OK: Pending Mails: |Pending=;10;20;;
Not sure that the below two lines are correct.
./check_blackberry5: line 82: [: : integer expression expected
./check_blackberry5: line 86: [: : integer expression expected
Re: check_blackberry5 and error (Return code of 127)
Means that on those lines there should be a numeric variable but the variable is not being set. The variable is set by running snmpwalk and parsing the output:
SNMPWALK_BIN is set to be /usr/bin/snmpwalk, so let's look at the following:
Of course make the replacements in <brackets> as necessary.
Code: Select all
PENDINGMSGOID=`$SNMPWALK_BIN -v 2c -c $community -On $hostname $PENDINGMSG | awk '{print $4}' | tr -d '\n'`;Code: Select all
which snmpwalk
ls -l /usr/bin/snmpwalk
/usr/bin/snmpwalk -v 2c -c <your community string here> -On <hostname here> '1.3.6.1.4.1.3530.6.7.10.40.10.1.16'
/usr/bin/snmpwalk -v 2c -c <your community string here> -On <hostname here> '1.3.6.1.4.1.3530.6.7.10.40.10.1.16' | awk '{print $4}'
/usr/bin/snmpwalk -v 2c -c <your community string here> -On <hostname here> '1.3.6.1.4.1.3530.6.7.10.40.10.1.16' | awk '{print $4}' | tr -d '\n'Former Nagios employee