Thanks everyone! I was using my mail id instead of USEREMAIL = "$user.email$"
Problem resolved. Regards, Tejas On Wed, Jun 3, 2015 at 3:54 PM, Tejas Gadaria <refond.g...@gmail.com> wrote: > Does icinga2 uses "sendmail" to send email notification? because I have > setup SMTP relay on on postfix. > > Regards. > Tejas > > On Wed, Jun 3, 2015 at 2:27 PM, Michael Friedrich < > michael.friedr...@netways.de> wrote: > >> Am 03.06.2015 um 10:49 schrieb Tejas Gadaria: >> >> Hi Markus >> >> >> >> >> >> >> >> >> >> *object User "Tejas" { import "generic-user" enable_notifications = >> true states = [ OK, Warning, Critical ] types = [ Problem, Recovery ] >> display_name = "Tejas Gadaria" groups = [ "icingaadmins" ] email = >> "refond.g...@gmail.com <refond.g...@gmail.com>" }* >> >> >> >> *object UserGroup "icingaadmins" { display_name = "Icinga 2 Admin >> Group" }* >> >> Above snippet belongs to user.conf file. >> ================================== >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> * apply Notification "mail-icingaadmin" to Host { import >> "mail-host-notification" users = [ "Tejas","icingaadmin" ] user_groups >> = host.vars.notification.mail.groups assign where >> host.vars.notification.mail } apply Notification "mail-icingaadmin" to >> Service { import "mail-service-notification" users = [ >> "Tejas","icingaadmin" ] user_groups = host.vars.notification.mail.groups >> assign where host.vars.notification.mail } * >> above snippet from notification.conf >> ================================== >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> * template User "generic-user" { } /** * Provides default settings for >> host notifications. * By convention all host notifications should import >> * this template. */ template Notification "mail-host-notification" { >> command = "mail-host-notification" interval = 15m states = [ Up, Down ] >> types = [ Problem, Acknowledgement, Recovery, Custom, >> FlappingStart, FlappingEnd, DowntimeStart, DowntimeEnd, >> DowntimeRemoved ] period = "24x7" } /** * Provides default settings for >> service notifications. * By convention all service notifications should >> import * this template. */ template Notification >> "mail-service-notification" { command = "mail-service-notification" >> states = [ OK, Warning, Critical, Unknown ] types = [ Problem, >> Acknowledgement, Recovery, Custom, FlappingStart, FlappingEnd, >> DowntimeStart, DowntimeEnd, DowntimeRemoved ] period = "24x7" >> } * >> above template.conf >> ==================================== >> >> >> Ok, and now the NotificationCommand referenced as >> >> command = "mail-service-notification" >> >> >> >> >> @Michael >> Do i have to specify notification for each service separately ? >> >> >> No, but the common term is "Notification" as object type, either you're >> configuring it per object or generating them using apply rules. >> >> Kind regards, >> Michael >> >> >> if So how can i configure it. >> >> Regards, >> Tejas >> >> On Wed, Jun 3, 2015 at 2:00 PM, Michael Friedrich < >> michael.friedr...@netways.de> wrote: >> >>> Am 03.06.2015 um 09:10 schrieb Tejas Gadaria: >>> >>>> Also as newbie I am not aware on how to configure email notification for >>>> clients. I can post the snippet you want to analyze. >>>> >>> >>> Still waiting for it. I suspect wrong configuration in the first place. >>> >>> Please add Host, Service, Notification, User (either from the config, or >>> by invoking 'object list'). >>> >>> >>> http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/troubleshooting#troubleshooting >>> >>> Kind regards, >>> Michael >>> >>> >>> -- >>> Michael Friedrich, DI (FH) >>> Application Developer >>> >>> NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg >>> Tel: +49 911 92885-0 | Fax: +49 911 92885-77 >>> GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461 >>> http://www.netways.de | michael.friedr...@netways.de >>> >>> ** OSBConf 2015 - September - osbconf.org ** >>> ** OSMC 2015 - November - netways.de/osmc ** >>> _______________________________________________ >>> icinga-users mailing list >>> icinga-users@lists.icinga.org >>> https://lists.icinga.org/mailman/listinfo/icinga-users >>> >> >> >> >> _______________________________________________ >> icinga-users mailing >> listicinga-users@lists.icinga.orghttps://lists.icinga.org/mailman/listinfo/icinga-users >> >> >> >> -- >> Michael Friedrich, DI (FH) >> Application Developer >> >> NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg >> Tel: +49 911 92885-0 | Fax: +49 911 92885-77 >> GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461 >> http://www.netways.de | michael.friedr...@netways.de >> >> ** OSBConf 2015 - September - osbconf.org ** >> ** OSMC 2015 - November - netways.de/osmc ** >> >> _______________________________________________ >> icinga-users mailing list >> icinga-users@lists.icinga.org >> https://lists.icinga.org/mailman/listinfo/icinga-users >> >> >
_______________________________________________ icinga-users mailing list icinga-users@lists.icinga.org https://lists.icinga.org/mailman/listinfo/icinga-users