Page 1 of 2

Email Notifications Marked as High Importance

Posted: Fri May 29, 2015 10:40 am
by jkinning
When I receive email notifications from Nagios for Warnings and Critical Host/Services the email message is marked as High Importance. Is there a way to change that so only Critical events are marked that way? I have a rule setup for Nagios messages to get dropped to a Nagios folder within Outlook and it would be nice to just look at the High Importance red ! ones first but the way it is now they all are marked that way.

Re: Email Notifications Marked as High Importance

Posted: Fri May 29, 2015 11:52 am
by lmiltchev
You will be able to enable/disable the "high priority" emails in the next release of XI. For the time being, you could try modifying the "/usr/local/nagiosxi/html/includes/utils-email.inc.php" file (after line 90).

Re: Email Notifications Marked as High Importance

Posted: Fri May 29, 2015 1:38 pm
by jkinning
I am not sure what I would add or modify within that code. :( Is there a guesstimate on the next release date?

Re: Email Notifications Marked as High Importance

Posted: Fri May 29, 2015 1:48 pm
by tmcdonald
I don't have an exact date, but looking at our usual release cycle and taking into consideration some testing tasks we have gotten recently, it can't be too far off. A few months, it's going to be a fairly major release.

Re: Email Notifications Marked as High Importance

Posted: Fri May 29, 2015 2:41 pm
by jkinning
OK. WIll this be the one that has Active Directory integration for users? :D The one where no local accounts will be necessary?

Re: Email Notifications Marked as High Importance

Posted: Mon Jun 01, 2015 10:55 am
by lmiltchev
Local users are necessary, but will be able to be automatically imported and synced with AD.

Re: Email Notifications Marked as High Importance

Posted: Thu Jun 18, 2015 7:29 am
by jkinning
lmiltchev wrote:You will be able to enable/disable the "high priority" emails in the next release of XI. For the time being, you could try modifying the "/usr/local/nagiosxi/html/includes/utils-email.inc.php" file (after line 90).
I don't want to foobar our system so what would I need to modify within that PHP file?

Re: Email Notifications Marked as High Importance

Posted: Thu Jun 18, 2015 10:50 am
by lmiltchev
You can try commenting out the whole section (dont' delete anything), so it is going to look like this:

// if (isset($opts["type"]) && $opts["type"] == "PROBLEM") {
// For most clients expecting the Priority header:
// 1 = High, 2 = Medium, 3 = Low
// $mail->Priority = 1;
// MS Outlook custom header
// May set to "Urgent" or "Highest" rather than "High"
// $mail->AddCustomHeader("X-MSMail-Priority: High");
// Not sure if Priority will also set the Importance header:
// $mail->AddCustomHeader("Importance: High");
// }

Let me know if this helped.

Re: Email Notifications Marked as High Importance

Posted: Tue Jun 30, 2015 10:58 am
by jkinning
This removed the ! Important identifier for all the email messages. I was looking to have the ! Important for just Critical messages and not the Warnings.

Re: Email Notifications Marked as High Importance

Posted: Tue Jun 30, 2015 11:29 am
by ssax
You could try changing it to:

Code: Select all

    if (strpos($mail->Subject, 'CRITICAL')) {
        // For most clients expecting the Priority header:
        // 1 = High, 2 = Medium, 3 = Low
        $mail->Priority = 1;
        // MS Outlook custom header
        // May set to "Urgent" or "Highest" rather than "High"
        $mail->AddCustomHeader("X-MSMail-Priority: High");
        // Not sure if Priority will also set the Importance header:
        $mail->AddCustomHeader("Importance: High");
    }