I've been spinning my wheels trying to fix an existing nagios and check_mk instance after a failed attempt at an update.
Centos 6.6
Nagios Core 3.5.1
CheckMK v1.2.3i3
It's all back up and running EXCEPT nagios & check_mk Web interfaces both show PING status as UNREACHABLE or DOWN .... even though multiple services are updating correctly in the web interfaces..
Running 'check_ping' at CLI as root or nagios work just fine.
Code: Select all
root@nagiosserver ~]# /usr/lib64/nagios/plugins/check_ping -H vhost1 -w 100.0,20% -c 500.0,60% -p 5
PING OK - Packet loss = 0%, RTA = 0.41 ms|rta=0.415000ms;100.000000;500.000000;0.000000 pl=0%;20;60;0
Code: Select all
[root@nagiosserver ~]# su - nagios
-bash-4.1$ /usr/lib64/nagios/plugins/check_ping -H vhost1 -w 100.0,20% -c 500.0,60% -p 5
PING OK - Packet loss = 0%, RTA = 0.39 ms|rta=0.392000ms;100.000000;500.000000;0.000000 pl=0%;20;60;0
Code: Select all
# Sets $USER1$ to be the path to the plugins
$USER1$=/usr/lib64/nagios/plugins
more
I assume this is what is being called from command.cfg:
Code: Select all
<snip>
# 'check-host-alive' command definition
define command{
command_name check-host-alive
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
}
Code: Select all
[root@nagiosserver plugins]# ls -l /usr/lib64/nagios/plugins
total 2876
drwxrwxr-x. 3 root root 4096 Apr 20 09:13 .
drwxr-xr-x. 8 root root 4096 Apr 17 16:27 ..
-rwxr-xr-x. 1 root root 2346 Jan 17 20:28 check_breeze
-rwxr-xr-x. 1 root root 68584 Jan 17 20:28 check_by_ssh
lrwxrwxrwx. 1 root root 9 Apr 17 10:23 check_clamd -> check_tcp
-rwxr-xr-x. 1 root root 52696 Jan 17 20:28 check_cluster
-rwxr-xr-x. 1 root root 67224 Jan 17 20:28 check_dhcp
-rwxr-xr-x. 1 root root 68680 Jan 17 20:28 check_dig
-rwxr-xr-x. 1 root root 71520 Jan 17 20:28 check_disk
-rwxr-xr-x. 1 root root 9469 Jan 17 20:28 check_disk_smb
-rwxr-xr-x. 1 root root 73856 Jan 17 20:28 check_dns
-rwxr-xr-x. 1 root root 37168 Jan 17 20:28 check_dummy
-rwxr-xr-x. 1 root root 3860 Jan 17 20:28 check_file_age
-rwxr-xr-x. 1 root root 6412 Jan 17 20:28 check_flexlm
-rwxr-xr-x. 1 root root 67464 Jan 17 20:28 check_fping
lrwxrwxrwx. 1 root root 9 Apr 17 10:23 check_ftp -> check_tcp
-rwxr-xr-x. 1 root root 57040 Jan 17 20:28 check_game
-rwxr-xr-x. 1 root root 63296 Jan 17 20:28 check_hpjd
-rwxr-xr-x. 1 root root 150904 Jan 17 20:28 check_http
-rwxr-xr-x. 1 root root 71896 Apr 17 16:15 check_icmp
-rwxr-xr-x. 1 root root 54768 Jan 17 20:28 check_ide_smart
lrwxrwxrwx. 1 root root 9 Apr 17 10:23 check_imap -> check_tcp
-rwxr-xr-x. 1 root root 6984 Jan 17 20:28 check_ircd
lrwxrwxrwx. 1 root root 9 Apr 17 10:23 check_jabber -> check_tcp
-rwxr-xr-x. 1 root root 67304 Jan 17 20:28 check_ldap
lrwxrwxrwx. 1 root root 10 Apr 17 10:23 check_ldaps -> check_ldap
-rwxr-xr-x. 1 root root 56920 Jan 17 20:28 check_load
-rwxr-xr-x. 1 root root 6595 Jan 17 20:28 check_log
-rwxr-xr-x. 1 root root 22756 Jan 17 20:28 check_mailq
-rwxr-xr-x. 1 root root 3410 Oct 29 2013 check_mkevents
-rwxr-xr-x. 1 root root 55376 Jan 17 20:28 check_mrtg
-rwxr-xr-x. 1 root root 55240 Jan 17 20:28 check_mrtgtraf
-rwxr-xr-x. 1 root root 79944 Jan 17 20:28 check_mysql
-rwxr-xr-x. 1 root root 74288 Jan 17 20:28 check_mysql_query
-rwxr-xr-x. 1 root root 57768 Jan 17 20:28 check_nagios
lrwxrwxrwx. 1 root root 9 Apr 17 10:23 check_nntp -> check_tcp
lrwxrwxrwx. 1 root root 9 Apr 17 10:23 check_nntps -> check_tcp
-rwxr-xr-x. 1 root root 71000 Jan 17 20:28 check_nt
-rwxr-xr-x. 1 root root 68792 Jan 17 20:28 check_ntp
-rwxr-xr-x. 1 root root 67856 Jan 17 20:28 check_ntp_peer
-rwxr-xr-x. 1 root root 14314 Jan 17 20:28 check_ntp.pl
-rwxr-xr-x. 1 root root 64856 Jan 17 20:28 check_ntp_time
-rwxr-xr-x. 1 root root 80360 Jan 17 20:28 check_nwstat
-rwxr-xr-x. 1 root root 8926 Jan 17 20:28 check_oracle
-rwxr-xr-x. 1 root root 61776 Jan 17 20:28 check_overcr
-rwxr-xr-x. 1 root root 76096 Jan 17 20:28 check_pgsql
-rwxr-xr-x. 1 root root 70464 Jan 17 20:28 check_ping
lrwxrwxrwx. 1 root root 9 Apr 17 10:23 check_pop -> check_tcp
-rwxr-xr-x. 1 root root 69672 Jan 17 20:28 check_procs
-rwxr-xr-x. 1 root root 60544 Jan 17 20:28 check_real
-rwxr-xr-x. 1 root root 9679 Jan 17 20:28 check_rpc
-rwxr-xr-x. 1 root root 1465 Jan 17 20:28 check_sensors
lrwxrwxrwx. 1 root root 9 Apr 17 10:23 check_simap -> check_tcp
-rwxr-xr-x. 1 root root 90992 Jan 17 20:28 check_smtp
-rwxr-xr-x. 1 root root 114096 Jan 17 20:28 check_snmp
lrwxrwxrwx. 1 root root 9 Apr 17 10:23 check_spop -> check_tcp
-rwxr-xr-x. 1 root root 58824 Jan 17 20:28 check_ssh
lrwxrwxrwx. 1 root root 9 Apr 17 10:23 check_ssmtp -> check_tcp
-rwxr-xr-x. 1 root root 54088 Jan 17 20:28 check_swap
-rwxr-xr-x. 1 root root 79232 Jan 17 20:28 check_tcp
-rwxr-xr-x. 1 root root 59656 Jan 17 20:28 check_time
lrwxrwxrwx. 1 root root 9 Apr 17 10:23 check_udp -> check_tcp
-rwxr-xr-x. 1 root root 66136 Jan 17 20:28 check_ups
-rwxr-xr-x. 1 root root 50080 Jan 17 20:28 check_users
-rwxr-xr-x. 1 root root 3032 Jan 17 20:28 check_wave
drwxr-xr-x. 2 root root 4096 Aug 30 2013 eventhandlers
-rwxr-xr-x. 1 root root 51248 Jan 17 20:28 negate
-rwxr-xr-x. 1 root root 48248 Jan 17 20:28 urlize
-rwxr-xr-x. 1 root root 2088 Jan 17 20:28 utils.pm
-rwxr-xr-x. 1 root root 2791 Jan 17 20:28 utils.sh
All the plugins live in the same directory but only check_ping (or check_icmp?) is failing. It's got to be a permissions issue, right? I've tried setting the suid bit for check_ping/check_icmp but it did not make a difference. I tried group ownership 'nagios' for the plugins too. No joy.CRITICAL: Return code of 127 is out of bounds. Make sure the plugin you're trying to run actually exists. (worker: nagiosserver)
Any suggestions would be greatly appreciated.
Thank you,
Scott