I installed nagios version 4.0.2 on CentOS 6.5 64bit from source, the installation succeeded and nagios could start. However there is issue with notification when nagios checking 'check_ping' command, the host is alive and packet lost is 0%, nagios still send alert to my email. This is quite annoying.
Email notification like this:
PING OK - Packet loss = 0%, RTA = 341.55 ms
After searching around, I found solution related to check_ping command defined in /usr/local/nagios/etc/objects/commands.cfg. You need to make the check_ping command definition the same as check-host-alive. Otherwise you will get the same notification when it happens next.
define command{
command_name check-host-alive
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
}
define command{
command_name check_ping
#command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
}
Email notification like this:
***** Nagios *****
Notification Type: RECOVERY
Service: PING
Host: x.x.x.x
Address: x.x.x.x
State: OK
Date/Time: Wed Feb 26 16:08:46 ICT 2014
Additional Info:
After searching around, I found solution related to check_ping command defined in /usr/local/nagios/etc/objects/commands.cfg. You need to make the check_ping command definition the same as check-host-alive. Otherwise you will get the same notification when it happens next.
define command{
command_name check-host-alive
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
}
define command{
command_name check_ping
#command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
}