Hi All,
I’ve tried most of the troubleshooting steps in other similar threads.
I have newly installed Icinga2 instance which is configured via Director. My Users are getting notifications for Host Up/Down but not service Problem/Recovery.
If I send a custom notification for a service with force checked, then it comes through without issue so I’m pretty certain the notify command script and e-mail stack are working correctly.
I’ve included the relevant object definitions from the icing director preview below as well as the log output for a custom forced check (where I was notified) and a normal Problem check (where I wasn’t notified).
Any help or suggestions, much appreciated…
Thanks
Jona
object Service "test17" {
host_name = "test"
import "QuickService"
check_command = "check_https_with_hostname"
vars.Check_Command_Arg1 = "test.com"
vars.Check_Command_Arg2 = "test"
}
template Service "QuickService" {
max_check_attempts = "4"
check_period = "AllTime"
check_interval = 1m
retry_interval = 1m
check_timeout = 1m
enable_notifications = true
enable_active_checks = true
enable_passive_checks = true
enable_event_handler = true
enable_flapping = false
enable_perfdata = true
}
apply Notification "Service-User-Notify-All" to Service {
import "Service-User-Notify"
times.begin = 5s
period = "AllTime"
assign where match("*", service.display_name)
states = [ Critical, OK, Unknown, Warning ]
users = [ "Jona" ]
}
template Notification "Service-User-Notify" {
command = "mail-service-notification"
interval = 0s
period = "AllTime"
users = [ "Jona" ]
}
object TimePeriod "AllTime" {
import "legacy-timeperiod"
display_name = "All Time"
ranges = {
"friday" = "00:00-23:59"
"monday" = "00:00-23:59"
"saturday" = "00:00-23:59"
"sunday" = "00:00-23:59"
"thursday" = "00:00-23:59"
"tuesday" = "00:00-23:59"
"wednesday" = "00:00-23:59"
}
}
object User "Jona" {
import "User-Template-Notify"
display_name = "(Removed)"
email = "(Removed)"
pager = "(Removed)"
period = "AllTime"
states = [ Down, Up ]
types = [ Custom, Problem, Recovery ]
}
template User "User-Template-Notify" {
enable_notifications = true
period = "AllTime"
states = [ Down, Up ]
types = [ Problem, Recovery ]
}
[2022-10-31 09:39:20 +0000] information/Checkable: Checkable 'test!test17' has 1 notification(s). Checking filters for type 'Problem', sends will be logged.
[2022-10-31 09:45:30 +0000] information/Checkable: Checkable 'test!test17' has 1 notification(s). Checking filters for type 'Custom', sends will be logged.
[2022-10-31 09:45:30 +0000] information/Notification: Sending 'Custom' notification 'test!test17!Service-User-Notify-All' for user 'Jona'