Archived community.zenoss.org | full text search
Skip navigation
Currently Being Moderated

Create Professional Alert E-mails

VERSION 1 
Created on: Sep 14, 2009 11:21 AM by Noel Brockett - Last Modified:  Sep 14, 2009 11:21 AM by Noel Brockett

The default Zenoss alert E-mail messages are very plain, luckily you can liven them up by customizing the content with "Some" html.

 

You have to keep in mind that Zenoss will add a return character to every line of your HTML messing up the formatting.
A way around this is to add a note field at the end of each line, so when Zenoss adds a character return it is turned into an informational note instead...or even easier, take the code below and paste in your alerting rule message:

 

<table style="height: 186px;" border="0" cellpadding="5" cellspacing="1" width="600px"><!
  <tbody><!
    <tr><!
      <td colspan="2" bgcolor="#d1ddf5"><font face="verdana" size="2"><b>Message</b></font></td><!
    </tr><!
    <tr><!
      <td style="height: 20px;" colspan="2" bgcolor="#f9f9f5"> %(message)s</td><!
    </tr><!
    <tr><!
      <td style="height: 20px;" colspan="2" bgcolor="#d1ddf5"><font face="verdana" size="2"><b>Alarm Details</b></font></td><!
    </tr><!
    <tr><!
      <td style="height: 24px;" bgcolor="#ebf4f7" width="120"><font face="verdana" size="2">Event Details</font></td><!
      <td style="height: 24px;" bgcolor="#f9f9f5" width="580"><font face="verdana, helvetica, arial" size="2"><!
      <p><a href="%(eventUrl)s">Event Detail</a></p><!
      </font></td><!
    </tr><!
    <tr><!
      <td style="height: 28px;" bgcolor="#ebf4f7" width="120"><font face="verdana" size="2">Device Name</font></td><!
      <td style="height: 28px;" bgcolor="#f9f9f5" width="580"><font face="verdana, helvetica, arial" size="2">%(device)s</font></td><!
    </tr><!
    <tr><!
      <td style="height: 29px;" bgcolor="#ebf4f7" width="120"><font face="verdana" size="2">Components</font></td><!
      <td style="height: 29px;" bgcolor="#f9f9f5" width="580"><font face="verdana, helvetica, arial" size="2">%(component)s</font></td><!
    </tr><!
    <tr><!
      <td style="height: 25px;" bgcolor="#ebf4f7" width="120"><font face="verdana" size="2">Severity</font></td><!
      <td style="height: 25px;" bgcolor="#f9f9f5" width="580"><font face="verdana, helvetica, arial" size="2">%(severityString)s</font></td><!
    </tr><!
    <tr><!
      <td style="height: 28px;" bgcolor="#ebf4f7" width="120"><font face="verdana" size="2">Actions</font></td><!
      <td style="height: 28px;" bgcolor="#f9f9f5" width="580"><font face="verdana, helvetica, arial" size="2"> <a href="%(ackUrl)s">Acknowledge</a> &nbsp&nbsp&nbsp&nbsp <a href="%(deleteUrl)s">Delete</a> &nbsp&nbsp&nbsp&nbsp <a href="%(eventsUrl)s">Device Events</a> </font></td><!
    </tr><!
  </tbody><!
</table><!
<table border="0" cellpadding="5" cellspacing="1" width="600px"><!
  <tbody><!
    <tr><!
      <td style="height: 56px;" align="right" bgcolor="#d1ddf5"><font face="verdana, helvetica, arial" size="2">Generated at %(firstTime)s</font></td><!
    </tr><!
    <tr><!
      <td style="height: 0px;"><!
      <p align="right"><font color="#999999" face="verdana" size="2"><b>Reported by : <span style="text-decoration: underline;">Zenoss</span>     </b></font></p><!
      </td><!
    </tr><!
  </tbody><!
</table>
Comments (0)