Page 1 of 1

Can't change subject line of emails in notify-host-by-email

Posted: Mon Feb 07, 2011 3:57 am
by fao
nagios 2009R1.9
Centos 5.4 VM image

I can't change the subject line for notification e-mails in the notify-host-by-service-by-email by prepending "[Nagios]" to the subject line

I change command using the Commands section of the nagiosxi GUI. I am not trying to change commands.cfg

after I apply my new configuration, it appears in the nagios/ect/commands.cfg

however, my alert e-mails are unchanged. please advise

Re: Can't change subject line of emails in notify-host-by-email

Posted: Mon Feb 07, 2011 10:41 am
by mguthrie
In NagiosXI the notifications are actually set up to be managed through the XI user settings, not so much the Core Config Manager.

XI notifications are primarily sent through the xi-host/service_notification_handler. The messages can be customized per user from the Configure->My Account Setting->Notification Message page.

Re: Can't change subject line of emails in notify-host-by-email

Posted: Mon Feb 07, 2011 10:50 am
by fao
so there is no way to customize for all users? This is a pretty important feature for my team

Re: Can't change subject line of emails in notify-host-by-email

Posted: Mon Feb 07, 2011 10:57 am
by fao
So here is my incredibly ugly hack, I hope you guys come up w/ a better way soon

[root@myserver /usr/local/nagiosxi/html/includes]# vi utils-email.inc.php
65: $mail->Subject="[NAGIOS] " . $opts["subject"];

Re: Can't change subject line of emails in notify-host-by-email

Posted: Mon Feb 07, 2011 11:17 pm
by mguthrie
Did you try adding your modified 'notify-host-by-email" command to the list of notification commands for your main contact template? That should allow you to do your system-wide custom notification. Go to the CCM->Contact->xi-contact-generic, and add the modified command to the list of host/service commands.