I am confused on the timing involved on my checks:
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
contact_groups admins communication
notification_interval 60
notification_period 24x7
notifications_enabled 1
icon_image ncpa.png
statusmap_image ncpa.png
register 1
How does the timing break down for max_check_attempts, check_interval, retry_interval? Is it by minutes? If so how would I change it to something that has a shorter response time?
Nagios Timing
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Nagios Timing
Everything is based off minutes, this is the default timing in Nagios. I can be changed in a global config but not recommended.
check_interval is when everything is running OK. In your case checks occur every 5 minutes.
When a check returns a non-ok status it enters a SOFT state and checks from this point will occur at the retry_interval period, in your case this is every 1 minute.
max_check_attempts is how many times a check will be scheduled based on the retry_interval before it enters a HARD state and notifications are sent. Your max_check_attempts is set to 5, so there are 4 more remaining. So another 4 minutes will pass.
When the 5th max_check_attempts is reached and it enters a HARD state then the check will resume checking at the check_interval period.
To get a shorter response time reduce the number of max_check_attempts.
Also keep in mind that your check may return an OK status and 10 seconds later it actually fails, but it's another 4m50s before Nagios actually checks the service again and with max_check_attempts it could be up to 10 minutes before a notification is sent.
check_interval is when everything is running OK. In your case checks occur every 5 minutes.
When a check returns a non-ok status it enters a SOFT state and checks from this point will occur at the retry_interval period, in your case this is every 1 minute.
max_check_attempts is how many times a check will be scheduled based on the retry_interval before it enters a HARD state and notifications are sent. Your max_check_attempts is set to 5, so there are 4 more remaining. So another 4 minutes will pass.
When the 5th max_check_attempts is reached and it enters a HARD state then the check will resume checking at the check_interval period.
To get a shorter response time reduce the number of max_check_attempts.
Also keep in mind that your check may return an OK status and 10 seconds later it actually fails, but it's another 4m50s before Nagios actually checks the service again and with max_check_attempts it could be up to 10 minutes before a notification is sent.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
nickanderson1982
- Posts: 72
- Joined: Wed Feb 06, 2019 3:22 pm
Re: Nagios Timing
How would I change it so that I'm checking every 30 seconds instead of every 1 minute.
My current setup is:
max_check_attempts 5
check_interval 5
retry_interval 1
My current setup is:
max_check_attempts 5
check_interval 5
retry_interval 1
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Nagios Timing
https://assets.nagios.com/downloads/nag ... gmain.html
Timing Interval Length
Format: interval_length=<seconds>
This is not something I would recommend, simply accept that Nagios is based on 1 minute intervals otherwise it's going to get very confusing very fast.
Timing Interval Length
Format: interval_length=<seconds>
This is not something I would recommend, simply accept that Nagios is based on 1 minute intervals otherwise it's going to get very confusing very fast.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.