Page 1 of 1

Long intervals for notifications

Posted: Mon Jun 20, 2016 5:30 pm
by mrkrupp
Hello Nagios support,

I'm testing my notification intervals by bringing one of my servers up and down. It seems that when the server goes down, it is detected within the first minute or so from the web interface but it does not send a notification to my email till about 15 minutes later. Is there a way this can be lessened? I notice when it recovers I receive that notification rather quickly. When I view my list of hosts the First Notification Delay is 0h0m0s so I'm not sure why it takes so long for the nagios to queue the email notification.

Thanks for any help and insight you can provide!!

Re: Long intervals for notifications

Posted: Mon Jun 20, 2016 5:35 pm
by rhassing
I think it has to do with the following config:

Code: Select all

	max_check_attempts             	2
	check_interval                 	5
	retry_interval                 	1
This host is checked every 5 minutes.
If it fails it checks 2 times with an interval of 1 minute.

So it will take at least 7 minutes before the notifications is send.

Re: Long intervals for notifications

Posted: Mon Jun 20, 2016 5:41 pm
by mrkrupp
Where can I change those intervals?

Re: Long intervals for notifications

Posted: Mon Jun 20, 2016 5:43 pm
by rhassing
In the config files.
It depends where you installed them, but normally in /etc/nagios/hosts/, /etc/nagios/objects/ or /usr/local/nagios/etc/

Re: Long intervals for notifications

Posted: Mon Jun 20, 2016 5:52 pm
by mrkrupp
I am in my /usr/local/etc/nagios.cfg file and I do not see any field for any of these fields:

Code: Select all

  max_check_attempts                2
   check_interval                    5
   retry_interval                    1
Is that the config file you are referring to?

Re: Long intervals for notifications

Posted: Mon Jun 20, 2016 5:56 pm
by rhassing
You can set them in the host configuration.

Re: Long intervals for notifications

Posted: Tue Jun 21, 2016 9:19 am
by rkennedy
@rhassing is correct -- with Core we allow you to structure things however you like.

Your definition will start with something like define host { or define service {.

Re: Long intervals for notifications

Posted: Tue Jun 21, 2016 1:05 pm
by mrkrupp
This worked for me! Thank you both for your help!

Re: Long intervals for notifications

Posted: Tue Jun 21, 2016 1:23 pm
by rkennedy
Awesome - going to close this one up then. Feel free to make a new thread if you have questions in the future.