How to enable email alerts in Icinga
Email alerts will be enabled in Icinga by-default and it sends the alerts to "root@localhost". We need to change this mailid to the required one in the Icinga configuration.
This article explains the steps to change the Icinga alert email id.
Step1: Login to the Icinga server via ssh as root.
Step2: Open the configuration file "/etc/icinga2/conf.d/users.conf"
#vi /etc/icinga2/conf.d/users.conf
Step3: Update the the value of email and save the file.
/**
* The example user 'icingaadmin' and the example
* group 'icingaadmins'.
*/
object User "icingaadmin" {
import "generic-user"
display_name = "Icinga 2 Admin"
groups = [ "icingaadmins" ]
email = "MAILID"
}
object UserGroup "icingaadmins" {
display_name = "Icinga 2 Admin Group"
}
Where MAILID need to be replaced with the required email id.
Step4: Restart the Icinga service.
#systemctl restart icinga
Please note that the other configurations like notification interval can be set in the file "/etc/icinga2/conf.d/notifications.conf"
That's all…