icinga2-slack-notification

This is an improved version of https://github.com/nisabek/icinga2-slack-notifications with rich notification format, more details, and extensive configuration.

icinga2-rich-slack-notification

This is an improved version of https://github.com/nisabek/icinga2-slack-notifications with rich notification format, more details, and extensive configuration.

Preview

Sample Notification Preview

Additional Features

  1. Colored Notification.
  2. Shows alert state-duration in human readable format.
  3. Can send notifications to multiple Slack teams.
  4. Customizable footer text

Features

  1. Compatible Slack and Mattermost JSON Webhook attachments.
  2. Colored Notifications for states like OK, Warning, Critical etc.
  3. Includes raw plugin outputs.
  4. Shows alert state-duration in human readable format.
  5. Shows comment with owner for Acknowledgement and Custom notifications.
  6. Can send notifications to multiple Slack endpoints
  7. The default re-notification interval can be changed.
  8. The re-notification interval can be customized per host or service.
  9. 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

  1. Copy the two slack-notification-* confs to /etc/icinga2/conf.d/ directory
  2. Modify the vars.slack_notifications_icinga2_base_url in slack-notifications-configuration.conf with your IcingaWeb2 Base URL. This is to jump to Alert Dashboard right from Slack channel.
  3. Configure the existing host or service configuration like the provided one in sample.conf
  4. Get the webhook_url of the Slack Channel and add in to the object User section of required notification user(s). Read more here
  5. Validate the Icinga2 configuration and restart the service.

Advanced Configuration

  1. The notification color can be changed in the array variable vars.slack_notifications_color using HEX notation.
  2. Notifications for Scheduled DOWNTIME alerts are disabled by default. It can be enabled in the variable types
  3. The Footer text can be set using the variable vars.slack_footer_text in slack-notifications-configuration.conf