Nagios checks every 20s instead of 5 minutes

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ayoubitou
Posts: 14
Joined: Thu Nov 26, 2015 8:26 am

Nagios checks every 20s instead of 5 minutes

Post 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.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Nagios checks every 20s instead of 5 minutes

Post by hsmith »

Are any of your other hosts experiencing this issue, or is it isolated to this one? A minute is generally the minimum..
Former Nagios Employee.
me.
ayoubitou
Posts: 14
Joined: Thu Nov 26, 2015 8:26 am

Re: Nagios checks every 20s instead of 5 minutes

Post 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.
You do not have the required permissions to view the files attached to this post.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Nagios checks every 20s instead of 5 minutes

Post 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;"
Former Nagios Employee.
me.
ayoubitou
Posts: 14
Joined: Thu Nov 26, 2015 8:26 am

Re: Nagios checks every 20s instead of 5 minutes

Post 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:~#
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios checks every 20s instead of 5 minutes

Post by rkennedy »

Can you post your definition for the CUD hostgroup?
Former Nagios Employee
ayoubitou
Posts: 14
Joined: Thu Nov 26, 2015 8:26 am

Re: Nagios checks every 20s instead of 5 minutes

Post 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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios checks every 20s instead of 5 minutes

Post by rkennedy »

Just had to make sure!

Can you post your nagios.log for us to take a look?
Former Nagios Employee
ayoubitou
Posts: 14
Joined: Thu Nov 26, 2015 8:26 am

Re: Nagios checks every 20s instead of 5 minutes

Post by ayoubitou »

Here is the log file.
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios checks every 20s instead of 5 minutes

Post 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.
Former Nagios Employee
Locked