This is a adaptive version of:
Which is based on:
This is trying to get back to be more in line with the slack alerts.
Limitation / ToDo
Code in markdown seems to be unsupported?
- Colored Notifications for states like OK, Warning, Critical etc.
- Includes raw plugin outputs.(known to be broken in adaptice cards)
- Shows alert state-duration in human readable format.
- Shows comment with owner for Acknowledgement and Custom notifications.
- Can send notifications to multiple Teams endpoints
- The default re-notification interval can be changed.
- The re-notification interval can be customized per host or service.
- When the notification for a host is enabled, it will be inherited to all of its services checks, unless disabled for the specific service(s).
- Mobile app support (Note: this is way better for adaptive cards than MessageCard's by default.)
Installation and Basic Configuration
- Copy the
/etc/icinga2/zones.d/global-templates/directory (depending on architecture)
- Modify the
master_teams_config.confwith your IcingaWeb2 Base URL. This is to jump to Alert Dashboard right from Teams channel.
- Configure the existing host or service configuration like the provided one in the
- Get the
webhook_urlof the Teams Channel and add in to the
object Usersection of required notification user(s). Read more here
- Validate the Icinga2 configuration and restart the service.
- The notification color can be changed in the array variable
vars.teams_notifications_colorusing the supported card colors Documentation.
- Notifications for Scheduled DOWNTIME alerts are disabled by default. It can be enabled in the variable