Push Icinga2 notificaitons into Telegram groups or channel as bot
This is an modified version of https://github.com/seffparker/icinga2-rich-slack-notification made compatible with Telegram Bot API.
- Custom emoji for states like OK, Warning, Critical etc.
- Includes raw plugin outputs.
- Shows alert state-duration in human readable format.
- Shows comment with owner for Acknowledgement and Custom notifications.
- Can send notifications to multiple Telegram Channels or Groups
- 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).
Installation and Basic Configuration
- Copy the two
/etc/icinga2/conf.d/directory and configure the existing host or service configuration like the provided one in
- Modify the
telegram-notifications-configuration.confwith your IcingaWeb2 Base URL. This is to jump to Alert Dashboard right from Teams channel.
- Modify the
telegram-notifications-configuration.confwith the AUTH_TOKEN of Telegram Bot
- Get the
chat_idof the bot instance 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 emoji can be changed in the array variable
- Notifications for Scheduled DOWNTIME alerts are disabled by default. It can be enabled in the variable