Long intervals for notifications

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
mrkrupp
Posts: 22
Joined: Fri Apr 01, 2016 5:23 pm

Long intervals for notifications

Post 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!!
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Long intervals for notifications

Post 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.
Rob Hassing
Image
mrkrupp
Posts: 22
Joined: Fri Apr 01, 2016 5:23 pm

Re: Long intervals for notifications

Post by mrkrupp »

Where can I change those intervals?
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Long intervals for notifications

Post 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/
Rob Hassing
Image
mrkrupp
Posts: 22
Joined: Fri Apr 01, 2016 5:23 pm

Re: Long intervals for notifications

Post 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?
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Long intervals for notifications

Post by rhassing »

You can set them in the host configuration.
Rob Hassing
Image
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Long intervals for notifications

Post 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 {.
Former Nagios Employee
mrkrupp
Posts: 22
Joined: Fri Apr 01, 2016 5:23 pm

Re: Long intervals for notifications

Post by mrkrupp »

This worked for me! Thank you both for your help!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Long intervals for notifications

Post by rkennedy »

Awesome - going to close this one up then. Feel free to make a new thread if you have questions in the future.
Former Nagios Employee
Locked