This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Customize Email Alets

I was at the Chicago SWUG yesterday and the last thing they presented on was about alerting.

It was said that you can customize the emails that go out so they look a lot nicer (give it a little salt) instead of the way they are.

Does anybody have an example of code and what it looks like? I would like to start making the emails look professional for the teams that get them.

Thank you.

  • To quote cahunt​ from Alert Templates.zip

    You can add variables with the 'Insert Variable' button. Then cut and paste them where you need in the HTML Code. Or Build the code around your text that is already there. A lot of folks use a table so you can set the cell colors and spacing as desired

    <table><tr><td>Node:</td><td>${N=SwisEntity;M=Caption}</td></tr><tr><td>IP:</td><td>${N=SwisEntity;M=IP_Address}</td></tr><tr><td>Status:</td><td>${N=SwisEntity;M=Status}</td></tr>

  • I was able to do a little HTML for this and it worked out pretty well

    <html>

    <head>

    <style type="text/css">

    </style>

    </head>

    <body><!--  --!> Red Border #FF7D7D  Red light shade FFE0E0   Green Border #7DFF7F     Green Light Shade #E7FFE0 Warning Boarder #FFEC7D   Warrning light:FFDA0A   </!--  -->

    <table class='alert' style="border: 3px solid #FF7D7D; width: 400px; border-collapse: collapse; font-family: Verdana; font-size: 10pt;">

    <tr><th colspan="2" style="border-bottom: 3px solid #FF7D7D;padding: 5px;background-color: #FFE0E0">Network Alert</th></tr>

    <tr><td>Alert: </td><td>The Following Node Has Gone down</td></tr>

    <tr class='alt'><td style="background-color: #FFE0E0 ;width: 50%;text-align: justify;padding: 3px" >Node Name</td><td style="background-color: #FFE0E0 ;width: 50%;text-align: justify;padding: 3px">${NodeName}</td></tr>

    <tr><td>Location</td><td>${location}</td></tr>

    <tr class='alt'><td style="background-color: #FFE0E0; width: 50%;text-align: justify;padding: 3px">System Name</td><td style="background-color: #FFE0E0 ;width: 50%;text-align: justify;padding: 3px">${DNS}</td></tr>

    <tr><td>IP Address</td><td>${IP_Address}</td></tr>

    <tr class='alt'><td style=" background-color: #FFE0E0; width: 50%;text-align: justify;padding: 3px">Node URL</td><td style="background-color: #FFE0E0 ;width: 50%;text-align: justify;padding: 3px"><A href=${NodeDetailsURL}>Click Here</A></td></tr>

    <tr><td>Time of Alert</td><td>${Time}     ${Date}      ${Day}</td></tr>

    </table>

    </body> </html>

    What it looks like:

    pastedImage_0.png

    I am still playing around with it to get it to exactly what I want.

  • biedrzyc yours looks great so far!

    I saw these threads that looks like it has some stuff similar to Kevin's presentation last week:

    Reusable alert templates
    CSS in email alerts 

    bgpPeerState and Alerting (Need a second set of eyes)