prevent first critical notification
Posted: Mon Mar 06, 2017 6:48 am
Hi,
we have a problem with notifications in nagios. We use a service template which is set to send a sms notification for critical status only. So, if the status is "warning" for a longer period, the state changes to "HARD", which is okay. If then ONE check attempt is "critical" (for example network timeout), the notification is send out immediately. How can we prevent nagios from sending this notification? If the status remains "critical" the sms (notification) should be send out of course! But not until there is a second check, that returns "critical".
Can anybody help me doing this for ALL services? I tried to configure this for one service and this seems to work. I set up a serviceescalation that sets the notification_interval to 2 minutes, then after this the next step is to inform the admins via sms:
define serviceescalation{
hostgroup check_command
contact_groups admins
service_description CHECKNAME
first_notification 1
last_notification 1
notification_interval 2
}
define serviceescalation{
hostgroup check_command
contact_groups admins_sms
service_description CHECKNAME
first_notification 2
}
we have a problem with notifications in nagios. We use a service template which is set to send a sms notification for critical status only. So, if the status is "warning" for a longer period, the state changes to "HARD", which is okay. If then ONE check attempt is "critical" (for example network timeout), the notification is send out immediately. How can we prevent nagios from sending this notification? If the status remains "critical" the sms (notification) should be send out of course! But not until there is a second check, that returns "critical".
Can anybody help me doing this for ALL services? I tried to configure this for one service and this seems to work. I set up a serviceescalation that sets the notification_interval to 2 minutes, then after this the next step is to inform the admins via sms:
define serviceescalation{
hostgroup check_command
contact_groups admins
service_description CHECKNAME
first_notification 1
last_notification 1
notification_interval 2
}
define serviceescalation{
hostgroup check_command
contact_groups admins_sms
service_description CHECKNAME
first_notification 2
}