Page 1 of 2

Nagios checks every 20s instead of 5 minutes

Posted: Tue Jan 26, 2016 11:18 am
by ayoubitou
Hi,

I have configurated a template for hosts with check setting bellow :
define host {
name Router
hostgroups CUD
check_command check_xi_host_ping!3000.0!80%!5$
max_check_attempts 3
check_interval 5
retry_interval 5
active_checks_enabled 1
check_period 24x7
event_handler xi_host_notification_handler
event_handler_enabled 1
contact_groups admins
notification_interval 0
notification_period 24x7
first_notification_delay 15
register 0

}
My issue is that when a host is down, nagios check the host every 20s 3 times. I don't understand why 20s. I set it to check every 5 minutes three times. I have already checked my interval_length in the nagios.cfg file and it's set to 60.
Host Down 2016-01-26 16:21:14 HOST ALERT
Host Down 2016-01-26 16:20:58 HOST ALERT
Host Down 2016-01-26 16:20:40 HOST ALERT
Any Help ? Thanks.

Re: Nagios checks every 20s instead of 5 minutes

Posted: Tue Jan 26, 2016 11:21 am
by hsmith
Are any of your other hosts experiencing this issue, or is it isolated to this one? A minute is generally the minimum..

Re: Nagios checks every 20s instead of 5 minutes

Posted: Tue Jan 26, 2016 11:30 am
by ayoubitou
With all hosts, I have just done another test with a new host and the result is the same.

As you can see in first attachment it says next check at 17:29:57 but in the second attachment the check is done at 17:25:14, so almost 20s after the first one.

Re: Nagios checks every 20s instead of 5 minutes

Posted: Tue Jan 26, 2016 11:37 am
by hsmith
Can you check the date and time on the machine to make sure everything is in sync?

Code: Select all

date
mysql -unagiosxi -pn@gweb -e "SELECT NOW();"
php -r "echo date('r').PHP_EOL;"

Re: Nagios checks every 20s instead of 5 minutes

Posted: Tue Jan 26, 2016 11:40 am
by ayoubitou
root@nagiosxi:~# date
mardi 26 janvier 2016, 17:39:01 (UTC+0100)
root@nagiosxi:~# mysql -unagiosxi -pn@gweb -e "SELECT NOW();"
+---------------------+
| NOW() |
+---------------------+
| 2016-01-26 17:39:16 |
+---------------------+
root@nagiosxi:~# php -r "echo date('r').PHP_EOL;"
Tue, 26 Jan 2016 17:39:31 +0100
root@nagiosxi:~#

Re: Nagios checks every 20s instead of 5 minutes

Posted: Tue Jan 26, 2016 12:03 pm
by rkennedy
Can you post your definition for the CUD hostgroup?

Re: Nagios checks every 20s instead of 5 minutes

Posted: Tue Jan 26, 2016 12:05 pm
by ayoubitou
define hostgroup {
hostgroup_name CUD
alias CUD
members cud-camping,cud-hq,cud-majestic
}
I don't think that it has a link with the hostgroup definition.

Re: Nagios checks every 20s instead of 5 minutes

Posted: Tue Jan 26, 2016 12:16 pm
by rkennedy
Just had to make sure!

Can you post your nagios.log for us to take a look?

Re: Nagios checks every 20s instead of 5 minutes

Posted: Tue Jan 26, 2016 12:30 pm
by ayoubitou
Here is the log file.

Re: Nagios checks every 20s instead of 5 minutes

Posted: Tue Jan 26, 2016 12:42 pm
by rkennedy
After reviewing your log file, it looks like you have quite a bit of other applications at play -

Code: Select all

[1453816564] livestatus: Livestatus 1.2.7i3p5 by Mathias Kettner. Socket: '/usr/local/nagios/var/rw/live'
[1453816564] livestatus: Please visit us at http://mathias-kettner.de/
[1453816564] livestatus: Hint: please try out OMD - the Open Monitoring Distribution
[1453816564] livestatus: Please visit OMD at http://omdistro.org
[1453816564] livestatus: Finished initialization. Further log messages go to /usr/local/nagios/var/livestatus.log
With that in mind, we cannot support other products and how they interact with Nagios. As @hsmith mentioned - make sure your times match up. This could be the problem.