the shown examples are templates, you’ll need to define real objects (or apply rules) for notifications.
They can import the previously created templates.
I have a below and dont know where to integrate host & Notifications
Checks --> host templates —> host ( working good)
Notification , Users with email --> usergroup --> Notification Templates —> notification ( created )
Hi Michael
I found the below , and not sure where i am making the mistake. Look like its storing the temporary location “notification_apply.conf”
warning/ApplyRule: Apply rule ‘host_notification’ (in /var/lib/icinga2/api/packages/director/bcb21f71-d6dc-4e99-a687-e198ba91b1dd/zones.d/Master-Zone/notification_apply.conf: 1:0-1:45) for type ‘Notification’ does not match anywhere!
[2019-04-06 15:17:50 +1000] information/ApiListener: My API identity: localhost.localdomain
[2019-04-06 15:17:50 +1000] warning/ApplyRule: Apply rule ‘host_notification’ (in [[stage]/zones.d/Master-Zone/notification_apply.conf] for type ‘Notification’ does not match anywhere!
[2019-04-06 15:17:50 +1000] information/ConfigItem: Instantiated 1 ScheduledDowntime.
the assign where expression with host.check_timeout = 3 looks odd. Pick a different pattern, like host.vars.os == "Linux" or any other match for the hosts/services.
terminated with exit code 1, output: which: no mail in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin) mail not found in $PATH. Consider installing it.
Depending on your distribution, you need to install a local MTA (mail transfer agent). Typically Postfix, exim or sendmail. Best is to configure your local mail relay which can send emails to the Internet, if needed.
The mail binary points to this and the notification script passes the correct parameters.