Hey there,
I’m pretty new in this Community and already browsed alot for similar Topics, but didn’t find any solution that worked for me yet.
I’m configuring Notifications in Icinga2 Director, which will be part of my final exam. But I can’t get it working, because I always get that error, showing like this in my logs:
[2021-03-24 16:03:07 +0100] information/Notification: Sending reminder 'Problem' notification 'ubuntu!apt!Service-Notifications' for user 'test'
[2021-03-24 16:03:07 +0100] information/Notification: Completed sending 'Problem' notification 'ubuntu!apt!Service-Notifications' for checkable 'ubuntu!apt' and user 'test' using command 'mail-service-notification.sh'.
[2021-03-24 16:03:07 +0100] warning/PluginNotificationTask: Notification command for object 'ubuntu!apt' (PID: 18909, arguments: '/etc/icinga2/scripts/mail-service-notification.sh') terminated with exit code 1, output: Required parameter 'LONGDATETIME' is missing.
What I have done so far to configure Notifications:
- Created a Timeperiod for a 24x7 notify, monday-sunday
- Created a group icingaadmin, with myself as user in it. My user has a valid email there
- Created the command for the 2 mail-scripts mail-host-notification.sh and mail-service-notification.sh. My example of the command as shown below for hosts.
- Created the Notification itself.
- Mailing via -mail -s works perfect, and I’m also able to send a scripted mail calling the script itself in the folder.
I’m pretty stuck in here and thinking about it for a while now. Strange thing is, that sometimes the notification itself isn’t executed in the logs or the director, even if it should. Sending custom notifications doesn’t work as well. Does anyone have an idea what I’m missing?