Email Notifications Marked as High Importance
Email Notifications Marked as High Importance
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
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).
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Email Notifications Marked as High Importance
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
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.
Former Nagios employee
Re: Email Notifications Marked as High Importance
OK. WIll this be the one that has Active Directory integration for users?
The one where no local accounts will be necessary?
Re: Email Notifications Marked as High Importance
Local users are necessary, but will be able to be automatically imported and synced with AD.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Email Notifications Marked as High Importance
I don't want to foobar our system so what would I need to modify within that PHP file?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).
Re: Email Notifications Marked as High Importance
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.
// 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Email Notifications Marked as High Importance
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
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");
}