Hey,
I’m using Icinga r2.13.7-1 with Director and I’m struggling with notifications configuration to be sent to multiple users.
First user is called Desks
, and second one is the opsgenie
user for the opsgenie integration.
If there are both assigned, notifications are usually sent to Desks
. If there is only opsgenie
user, it works as well and opsgenie is receiving notification.
Let’s say I have a disk_usage
check and host chd-dev-test001
This is what I see in the logs:
[2024-07-26 09:12:03 -0500] information/Checkable: Checkable 'chd-dev-test001!disk_usage' has 3 notification(s). Checking filters for type 'Problem', sends will be logged.
[2024-07-26 09:12:03 -0500] information/Notification: Sending 'Problem' notification 'chd-dev-test001!disk_usage!everyone-service-apply-warning-to-critical' for user 'Desks'
[2024-07-26 09:12:03 -0500] information/Notification: Completed sending 'Problem' notification 'chd-dev-test001!disk_usage!everyone-service-apply-warning-to-critical' for checkable 'chd-dev-test001!disk_usage' and user 'Desks' using command 'mail-service-notification'.
Output from icinga2 object list --type "Notification" | grep chd-dev-test001
Object 'chd-dev-test001!disk_usage!everyone-service-apply' of type 'Notification':
* __name = "chd-dev-test001!disk_usage!everyone-service-apply"
* host_name = "chd-dev-test001"
Object 'chd-dev-test001!disk_usage!notify-opsgenie-service' of type 'Notification':
* __name = "chd-dev-test001!disk_usage!notify-opsgenie-service"
* host_name = "chd-dev-test001"
Users definitions:
object User "opsgenie" {
import "generic-user"
display_name = "OpsGenie Contact"
enable_notifications = true
}
object User "Desks" {
import "user-template"
enable_notifications = true
states = [ Critical, Down ]
}
Notifications definitions:
apply Notification "everyone-service-apply" to Service {
command = "mail-service-notification"
assign where host.vars.notification_useremail && (service.name == "cpu_throttling" || match("disk_usage*", service.name) || match("memory*", service.name) || service.name == "ssh" || match("mysql_slave*", service.name))
states = [ Critical, OK ]
types = [ Custom, Problem, Recovery ]
users = [ "Desks" ]
vars.notification_from = "support@example.com"
}
apply Notification "notify-opsgenie-service" to Service {
command = "opsgenie-service-notification"
assign where service
states = [ Critical, OK, Warning ]
types = [ Problem, Recovery ]
users = [ "opsgenie" ]
}
If anyone has an idea what is wrong with this approach, please let me know, I run out of ideas.
This is what I see in the GUI for this specific check, not sure where I can find this in the config