Hi Guys,
Like the XI GUI notification is there a possibility that when we receive email having Critical in subject it pops in red color.
are there any script or some text edition to the command which can help?
thanks
Email recieve CRITICAL notification in red color
-
- Posts: 182
- Joined: Thu May 14, 2015 9:57 pm
Re: Email recieve CRITICAL notification in red color
This actually won't work, as most email clients will not parse HTML in the subject line. Depending on what you're using though, you might be able to set up some filtering on your email client side to 'flag' subjects that contain 'CRITICAL'.
Former Nagios Employee
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Email recieve CRITICAL notification in red color
The content however can be customized with CSS and html.
Here's a post that was in the customer support section of the forum.
You can type any "custom" message in the "Host Alert Message" and "Service Alert Message" fields. You can use macros, and html/css tags to show some color. Here's an example of a "custom" host/service alert messages with some color
Once you set the template the way you want it, you can apply it to some users, or make it default for all users (if you are using Nagios XI Enterprise Edition). You can even lock the notification messages and settings for the selected non-admin users.
Hope this helps.
Here's a post that was in the customer support section of the forum.
You can type any "custom" message in the "Host Alert Message" and "Service Alert Message" fields. You can use macros, and html/css tags to show some color. Here's an example of a "custom" host/service alert messages with some color
Code: Select all
<style type='text/css'>.UP {color:green;}.DOWN {color:red;}.UNREACHABLE {color:orange}</style>
<h2 class='%hoststate%'>***** Nagios XI Alert *****</h2>
%alertsummary%
Notification Type: %type%
Host: %host%
State: <strong class='%hoststate%'>%hoststate%</strong>
Address: %hostaddress%
Hostgroup: %hostgroupnames%
Info: %hostoutput%
Date/Time: %datetime%
Host Notes: <font color="green">%hostnotes%</font>
Host Duration: %hostduration%
Respond: <href a="%responseurl%">%responseurl%</a>
Nagios URL: %xiserverurl%
Code: Select all
<style type='text/css'>.OK {color:green;}.WARNING {color:yellow;}.UNKNOWN {color:orange}.CRITICAL {color:red}</style>
<h3 class='%servicestate%'>***** Nagios XI Alert *****</h3>
%alertsummary%
Notification Type: %type%
Service Name: %service%
Service Displayname: %servicedisplayname%
Service Group: %servicegroupnames%
State: <strong class='%servicestate%'>%servicestate%</strong>
Host Name: %host%
Hostalias: %hostalias%
Address: %hostaddress%
Hostgroup: %hostgroupnames%
Info:
%serviceoutput%
%longserviceoutput%
Date/Time: %datetime%
Service Notes: <font color="green">%servicenotes%</font>
Respond: %responseurl%
Nagios URL: %xiserverurl%
Hope this helps.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 182
- Joined: Thu May 14, 2015 9:57 pm
Re: Email recieve CRITICAL notification in red color
Thanks mate
will definitely try that and let you guys know.
Cheers!
will definitely try that and let you guys know.
Cheers!
Re: Email recieve CRITICAL notification in red color
Let us know what your results are!
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/