Host notifications

Hi all,

I have a strange behavior with host notifications. Service notifications are working fine. When the server goes down an reach the retries the notifications is not triggered.
In the logs I only see:

Checking for configured notifications for object xxxx

But no errors in log files.
When I try to send a custom notification from the GUI it work as expected.
What’s wrong?

Apply rule:

apply Notification "xml-notification" to Host {
  import "xml-host-notification"

  user_groups = host.vars.notification.xml.groups
  users = host.vars.notification.xml.users


  assign where host.vars.notification.xml

}

Template:

template Notification "xml-host-notification" {
  command = "xml-host-notification"

  states = [ Down ]
  types = [ Problem, FlappingStart, Custom ]

  vars += {
    // notification_icingaweb2url = "https://www.example.com/icingaweb2"
    // notification_from = "Icinga 2 Host Monitoring <icinga@example.com>"
    notification_logtosyslog = false
  }

  period = "24x7"
}

Host object:

Notification {
* xml => {
  * groups =>
    * icingaadmins}

}

Thank you.

Hi,

enable the debug log and check why a filter prevents further notification handling. This also is described in the troubleshooting docs.

Cheers,
Michael

Thanks @dnsmichi,

I miss to configure the host state “Down” inside the user object.

Regards.