serviceescalation not working as expected
Posted: Sat Jan 09, 2021 10:43 am
We have Nagios configured to run checks every 5 minutes. We tried to setup serviceescalations so the notices would stop after the second failure. It's not working correctly and the notices keep going out after the the second notice.
Here are the reliant pieces of the configuration. I'm changed a bunch of the names so these examples may not be technically correct.
Service Template
Contact Template
Contact Group
Contact
Service
serviceescalation
I'm sure it's something silly that I'm just overlooking, so I'd really appreciate another set of eyes.
Here are the reliant pieces of the configuration. I'm changed a bunch of the names so these examples may not be technically correct.
Service Template
Code: Select all
define service {
name service_tpl
register 0
max_check_attempts 2
check_interval 5
retry_interval 5
check_period 24x7
notification_period 24x7
notification_interval 5
notification_options w,u,c,r
}Code: Select all
define contact {
name contact_tpl
register 0
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period 24x7
service_notification_period 24x7
host_notification_options d,u,r
service_notification_options w,u,c,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
}Code: Select all
define contactgroup {
contactgroup_name example-contactgroup
name example-contactgroup
members example-member
}Code: Select all
define contact {
use contact_tpl
contact_name example-member
name example-member
email [email protected]
}Code: Select all
define service {
use service_tpl
hostgroup example-hostgroup
service_description storage_root
check_command check_storage!$HOSTADDRESS$!/!50!75
contact_groups example-contactgroup
}Code: Select all
define serviceescalation {
hostgroup *
service_description *
first_notification 1
last_notification 2
notification_interval 5
contact_groups example-contactgroup
escalation_options u,c,r,w
}