Hello together,
I got problem to get icinga notifications by email working.
Actually working:
./mail-host-notification.sh -d 2024_11_27_12_13 -l testhostname -n testdisplayname -o testoutput -r xxxxx@xxxxx.com -s teststate -t testnotifacation
sudo -u nagios ./mail-host-notification.sh -d 2024_11_27_12_13 -l testhostname -n testdisplayname -o testoutput -r xxxxx@xxxxx.com -s teststate -t testnotifacation
leads both to an email
first information:
$ icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: r2.14.3-1)
$ icinga2 feature list
Disabled features: command compatlog debuglog elasticsearch gelf graphite influxdb influxdb2 journald livestatus opentsdb perfdata syslog
Enabled features: api checker icingadb mainlog notification
$ icinga2 daemon -C
[2024-11-27 17:48:10 +0100] information/cli: Icinga application loader (version: r2.14.3-1)
[2024-11-27 17:48:10 +0100] information/cli: Loading configuration file(s).
[2024-11-27 17:48:10 +0100] information/ConfigItem: Committing config item(s).
[2024-11-27 17:48:10 +0100] information/ApiListener: My API identity: xxxxx.xxxxx.com
[2024-11-27 17:48:10 +0100] warning/ApplyRule: Apply rule 'test_benachrichtigung_mail_service_warnung' (in /var/lib/icinga2/api/packages/director/b9166acd-8696-4c85-9a06-38bbc613f12b/zones.d/master/notification_apply.conf: 9:1-9:74) for type 'Notification' does not match anywhere!
[2024-11-27 17:48:10 +0100] warning/ApplyRule: Apply rule '20_test_benachrichtigung_mail_service_alle' (in /var/lib/icinga2/api/packages/director/b9166acd-8696-4c85-9a06-38bbc613f12b/zones.d/master/notification_apply.conf: 35:1-35:74) for type 'Notification' does not match anywhere!
[2024-11-27 17:48:10 +0100] warning/ApplyRule: Apply rule 'test_benachrichtigung_mail_host_kritisch' (in /var/lib/icinga2/api/packages/director/b9166acd-8696-4c85-9a06-38bbc613f12b/zones.d/master/notification_apply.conf: 1:0-1:68) for type 'Notification' does not match anywhere!
[2024-11-27 17:48:10 +0100] warning/ApplyRule: Apply rule '20_test_benachrichtigung_mail_host_alle' (in /var/lib/icinga2/api/packages/director/b9166acd-8696-4c85-9a06-38bbc613f12b/zones.d/master/notification_apply.conf: 28:1-28:68) for type 'Notification' does not match anywhere!
[2024-11-27 17:48:10 +0100] information/ConfigItem: Instantiated 3 NotificationCommands.
[2024-11-27 17:48:10 +0100] information/ConfigItem: Instantiated 1 IcingaApplication.
[2024-11-27 17:48:10 +0100] information/ConfigItem: Instantiated 1 HostGroup.
[2024-11-27 17:48:10 +0100] information/ConfigItem: Instantiated 45 Hosts.
[2024-11-27 17:48:10 +0100] information/ConfigItem: Instantiated 1 IcingaDB.
[2024-11-27 17:48:10 +0100] information/ConfigItem: Instantiated 1 FileLogger.
[2024-11-27 17:48:10 +0100] information/ConfigItem: Instantiated 47 Zones.
[2024-11-27 17:48:10 +0100] information/ConfigItem: Instantiated 1 CheckerComponent.
[2024-11-27 17:48:10 +0100] information/ConfigItem: Instantiated 2 Users.
[2024-11-27 17:48:10 +0100] information/ConfigItem: Instantiated 45 Endpoints.
[2024-11-27 17:48:10 +0100] information/ConfigItem: Instantiated 1 ApiUser.
[2024-11-27 17:48:10 +0100] information/ConfigItem: Instantiated 1 ApiListener.
[2024-11-27 17:48:10 +0100] information/ConfigItem: Instantiated 1 NotificationComponent.
[2024-11-27 17:48:10 +0100] information/ConfigItem: Instantiated 251 CheckCommands.
[2024-11-27 17:48:10 +0100] information/ConfigItem: Instantiated 2 UserGroups.
[2024-11-27 17:48:10 +0100] information/ConfigItem: Instantiated 1 ServiceGroup.
[2024-11-27 17:48:10 +0100] information/ConfigItem: Instantiated 2 TimePeriods.
[2024-11-27 17:48:10 +0100] information/ConfigItem: Instantiated 326 Services.
[2024-11-27 17:48:10 +0100] information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'
[2024-11-27 17:48:10 +0100] information/cli: Finished validating the configuration file(s).
So I guess the root of the problem is at:
warning/ApplyRule: Apply rule ... for type 'Notification' does not match anywhere!
At this point I stuck
Any help appeciated