Problem with triggered notifications (custom works fine)

Hi,
i guess i have somewhere a problem with the assignment for notifications but i cannot find it.

The general notifications works fine. If i trigger a custom notification the email for hosts and services arrive propperly.

I will copy the director preview output for better understanding.

notification template

template Notification "email-service-notification" {
    command = "mail-service-notification"
    period = "24x7"
    states = [ Critical, OK, Unknown, Warning ]
    types = [ Custom, Problem, Recovery ]
    user_groups = [ "internal-it" ]
}

The command is imported via kickstart and its the default one.

notification apply

apply Notification "service-email" to Service {
    import "email-service-notification"

    period = "24x7"
    assign where service.enable_notifications && "core-asset" in host.groups
    states = [ Critical, OK, Warning ]
    types = [ Custom, Problem, Recovery ]
    users = [ "christianb" ]
}

In the web ui i can see that these notifications are appied to the service or host
image

But if the service goes in a critical hard state no notifications are triggered

The icinga2.log does not shows

[2024-10-18 09:29:06 +0200] information/Checkable: Checkable 'vmtask01.domain.de!ICINGA2 Agent' has 2 notification(s). Checking filters for type 'Problem', sends will be logged.
[2024-10-18 09:29:08 +0200] information/ApiListener: Reconnecting to endpoint 'vmtask01.tim.de' via host '192.168.150.52' and port '5665'
[2024-10-18 09:29:08 +0200] information/ConfigObject: Dumping program state to file '/var/lib/icinga2/icinga2.state'

I hope some can help. Thx.

Hi Christian,
just to be sure that the notification-feature is enabled on the master:
icinga2 feature list => Enabled features: notification

Sorry for the late reply. notifications are allready enabled:

root@vmmon01:~# icinga2 feature list
Disabled features: command compatlog debuglog elasticsearch gelf graphite influxdb2 journald livestatus opentsdb perfdata syslog
Enabled features: api checker icingadb influxdb mainlog notification

Hello :slight_smile:
The interesting log entries for notifications sadly are only visible in the debug log.
Enable it and then try sending the notification again (e.g. via submitting passive check results and states via the webinterface).

I suspect a limitation of states/types for the user (either set directly or via a template).