A better email template for icinga2

I have created a very simple HTML email alert Template for Icinga 2 to replace the default boring text-based email alert. This template can be easily installed by replacing existing alert scripts inside /etc/icinga2/scripts.

Update: I have replaced mail command with mutt due to an incompatibility of options among different Linux distributions. Also, I have added new color highlight feature for different states (ok=green,warning=orange and critical=red).

Screenshots

Icinga2 email alert screenshot Icinga2 email alert screenshot Icinga2 email alert screenshot

Prerequisite

Make Sure mutt package is installed on your server

How to install

  • Backup existing script files (mail-service-notification.sh and mail-host-notification.sh) inside /etc/icinga2/scripts
  • Download the scripts from this github repo and edit the “Variables for HTML Template” section in both scripts
  • Now replace the existing scripts with the new ones and Send a custom notification to test new HTML email template.

If you have any issues, please report it here

comments powered by Disqus