Page 1 of 1

Nagios to Alret only if Device is down for more than 5 min

Posted: Thu Nov 03, 2011 12:29 am
by redhat1981
Hi,

I have configured NagiosĀ® Coreā„¢ Version 3.2.2, I have configured a switch, Which goes down very often and comes up by its own, I want to configure nagios in such a way that if the switch is down for more than 5 minutes, Then only I should get alert. Attaching the service.cfg file.

Please let me know where should I do the changes in the config file.

define service{
host_name ie-b.mycompany.com
service_description LAN
check_command check_snmp_int!public!ethernet0/0
# first_notification 30
max_check_attempts 1
normal_check_interval 5
retry_check_interval 3
check_period 24x7
notification_interval 2280
notification_period 24x7
notification_options w,c,r
contact_groups Network
}

Thank you

Re: Nagios to Alret only if Device is down for more than 5 m

Posted: Thu Nov 03, 2011 9:29 am
by raggmopp
Change the max_check_attempts from 1 to 2 and change the retry_check_interval from 3 to 5.
The max_check_attempts is saying that on the 1st check that a problem is found, send an alert.
Changing that to 2 with a retry of 5 says, on 1st check, if problem found then retry the check in 5 min, if problem persists then 2 checks have been completed and send the alert.

You could have max_check_attempts set to 3 and retry_check_interval set to 3. This says, on 1st check that problem is found, retry the checks at 3 min intervals. The next retry will occur in 3 min. If problem persists another retry occurs in another 3 min. That is a total of 3 checks in 6 minutes and an alert is sent.

These are the differences between HARD and SOFT states.