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

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
fao
Posts: 99
Joined: Thu Feb 03, 2011 3:05 am

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

Post 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
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

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

Post 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.
fao
Posts: 99
Joined: Thu Feb 03, 2011 3:05 am

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

Post by fao »

so there is no way to customize for all users? This is a pretty important feature for my team
fao
Posts: 99
Joined: Thu Feb 03, 2011 3:05 am

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

Post 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"];
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

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

Post 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.
Locked