DX Application Performance Management

12 Days of CA APM – Day 5: Rich Email Notifications with Contextual Data

By Jake_Nelson posted 12-12-2014 09:54 AM

  

"On the fifth day of APM 9.7, the CA Team gave to me… Rich Email Notifications with Contextual Data "

 

Are you like me and tired of receiving generic – even cryptic – email alerts that indicate a problem with one of your applications? Are you frustrated when the email alerts contain very little context or pertinent information about the problem? Do you click on the embedded link for more details only to be taken to the same dashboard for every alert regardless of the metric that triggered it?

 

Well on this 5th day of CA APM, I have good news for you. With the release of CA APM 9.7, the CA team has delivered an enhanced Send SMTP Mail Action that will eliminate these frustrations by providing Rich Email Notifications with Contextual Data so that users can understand the urgency of a problem quicker and have 1-click access to the metric and/or alert triggering the problem.

 

Rather than just listing all the details of what’s new, I thought I would quickly show you how I used this new feature to meet some specific requirements from my APM environment. I started with the default email template that is created when a user creates a new Send SMTP Mail Action. The new default template is quite good and includes a very descriptive subject line as well as details on each metric that triggered the alert in the email body. However, in my case, I wanted to customize the following to add additional context to the alert email:

 

  • First, I wanted the subject for any alert to quickly (in the first few words) tell me the state of the alert (is it a caution or danger threshold that had been violated). So I adjusted the subject line in the template accordingly using the available dynamic property for Alert State.
  • Next, since I removed the EM host from the default template’s subject line but still wanted this information, I included it in the email body of the alert (the EM host is also a dynamic property).
  • Then I wanted each email to include some text about what the alert meant (and in some cases what should be done if a user receives the alert). I leveraged each alert’s Description field (not the email template description field) to set the actual text and added the Alert Description dynamic property to my template.
  • Finally, while the default template gives me the current metric value, for even more context I also wanted to include the alert threshold that was violated to trigger the alert.

 

After making these quick changes to the template, I left the rest of the default template in place. You can see my new Send SMTP Mail Action in the following picture:

 

blog1.png

 

As you can see from the picture, the enhanced Send SMTP Mail Action now supports HTML or text email notifications. It also supports a comprehensive list of substitution properties that you can use to add dynamic data to your alerts. These properties use an IntelliSense style auto completion that means you simply need to type “$” in the template editor to see all of the available properties.

 

The resulting email alert looks like the following:

 

blog2.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Wow! Much better than previous APM email alerts. You can see that APM filled in the correct values for all of the substitution properties I defined in my template. You can also see that for HTML emails, some embedded HTML styling is supported. The red and yellow styles for the alert status are there by default, but I also added some additional styling to my Alert Description.

 

If you want to make substantial changes to the email format, the default templates shown in the template editor are actually based on two base template files located on your Enterprise Manager. There is one for HTML emails, and one for text. You can modify these base template files to change the default template for all new Send SMTP Mail Actions or if you want to add additional style formatting to your HTML email alerts.

 

Last, but definitely not least, the biggest usability enhancement with this new Send SMTP Mail Action are the contextual links. These links will now take you directly to the metrics that triggered the alert or the alert definition itself – and for the correct time period. No more having to login to APM and hunt for the correct metric and time period. My frustration level just decreased!

 

Finally, in addition to the great enhancements detailed above, the CA APM team also delivered some additional enhancements to the “plumbing” of how the Send SMTP Mail Action works. These enhancements include:

 

  • Support for both plain and secure connections (SSL and TLS) to mail servers
  • Support the ability to change the default connection port
  • Support for certificates with SSL and TLS connections
  • Support for multiple recipient addresses
  • Enhanced the “Test Now” button on the Send SMTP Mail Action to perform a real-time test with the mail server to validate the configuration
  • Added multiple “X-CA-*” headers to the email to help with automation and routing of email alerts

 

I hope you find these new usability enhancements to the Send SMTP Mail Action in CA APM 9.7 as helpful as I did when defining and receiving alerts. Whether you need to make minor tweaks like I did above or more significant changes, the enhanced Send SMTP Mail Action in CA APM 9.7 definitely has the flexibility and usability needed to meet your organizations requirements.

 

PS: While we are on the subject of usability enhancements, I’ll leave you with one more CA APM 9.7 gift – a video of the Charting and Dashboard Improvements in the WebView UI.

 

 

Happy Holidays!

 

 

--------------------------------------------------------------------------------------

The 12 Days of APM Blog Series

 

Twelve (12/19)

Eleven (12/18)

Ten (12/17)

Nine (12/16)

Eight (12/15)

Seven (12/14)

Six (12/13)

Five Rich Email Notifications with Contextual Data (12/12)

Four Smart Instrumentation (12/11)

Three Mobile App Analytics (12/10)

Two APM Command Center (12/9)

and an E.P.I.C APM Strategy  (12/8)

———————————————————————————————————————————

7 comments
0 views

Comments

05-08-2018 04:15 AM

Hi Faheem,

 

The available options are:

 

Available Options

The following dynamic alert parameters are available.

Note: Tokens that return a list can not be utilized in Subject and if used will only return the token itself and not any part of the list it represents.
 ParameterDescription
${Alert_Description}Description of the Alert.
${Alert_Name}Name of the Alert. For HTML emails, this includes hyperlinks to the metric in WebView.
${Alert_State}Current state of the alert (normal, caution, danger).
${Alert_Time}Time the alert occurred.
${EM_Host}Host name of the Enterprise Manager.
${EM_Host_Ip}IP address of the Enterprise Manager.
${EM_Name}Name of the Enterprise Manager in IntroscopeEnterpriseManager.properties.
${Previous_Alert_State}

Previous state of the alert.

${Problem_Detail_List}List of the problem details. This list only contains items in Danger or Caution state associated to the alert.
${Problem_Detail_List_All}List of problem details. This list contains all items associated to the alert.
${Problem_Detail_List_Only}List of problem details. This list contains only the items matching the alert state.
${Threshold_Setting}Value of the alert threshold.
${URL_Alert_Info}URL for the alert information.
${URL_Detail_List}

List of URL's for the problem details. This list only contains items in Danger or Caution state associated to the alert.

${URL_Detail_List_All}List of URL's for the problem details. This list contains all items associated to the alert.
${URL_Detail_List_Only}

List of URL's for the problem details. This list contains only items matching the alert state.

 

I have been testing in my environment and unfortunately there is no option available to remove the particular part you pointed out and more likely it will need code change if I'm not mistaken.

I would suggest to raise an Enhancement Request or to wait if anyone else has an alternative to this that I am not aware of.

 

Thanks

Jose

05-08-2018 02:28 AM

Dear Jake/Jose

 

Thanks alot. I need your help with one more thing. The customer wants a little modification in the email alert which they receive from Wily apm. here's how the alert looks like currently,

 

What they want is to remove the JVM name and want to display only the metric information, every thing starting from SuperDoman till the first colon(:) needs to be removed. 

 

this is how they want the email body to look like:

I am also sharing the email body:

 

 

 

Kindly if you can help with this.

regards,

Faheem 

05-07-2018 08:10 AM

Hello Fareem,

 

They are located in "EM_home\config\notify" directory as documented in our guides (highlighted in bold in the below excerpt from the guide):

 

Create and Configure Notification Actions - CA Application Performance Management - 10.5 - CA Technologies Documentation 

 

Define a Common SMTP Email Notification Template

Define a common template in HTML or plain text format for all SMTP notifications including draft or test notifications. Include a corporate privacy disclaimer at the bottom of all notifications.

In the template, (${message_body}) indicates where the body definition is defined within the email message. When the notification is sent to recipients, the body definition is replaced with the new content.

Follow these steps:

  1. From the <EM_Home>/config/notify directory, open the appropriate template for editing:
    default.html or default.txt
  2. Locate (${message_body}) and define the email body content.
  3. Save your changes.
    The email template is set.

 

Thanks

Jose

05-07-2018 07:54 AM

Dear jake

 

I want to know the path of these files which i have highlighted in blue.

 

"If you want to make substantial changes to the email format, the default templates shown in the template editor are actually based on two base template files located on your Enterprise Manager. There is one for HTML emails, and one for text. You can modify these base template files to change the default template for all new Send SMTP Mail Actions or if you want to add additional style formatting to your HTML email alerts."

 

 

regards
Faheem

05-26-2016 01:01 PM

Jake_Nelson

It would be helpful where and how these URLs get populated so if there are issues then customers know how to troubleshoot. I've got an issue now regarding those information links that I need help with.

04-30-2015 06:12 PM

Hi Hal,

 

The notification template only supports placeholders for the type of data and its location in the email. It supports the ability to add some HTML styling around the placeholders, but not the actual placeholders or resulting text. Sounds like a great enhancement request to shorten these to something friendlier.

 

-jake

04-13-2015 08:30 AM

Dear Jake:

Thanks for this tip. However the links to problem metrics are have user-friendly URLs. Can these be cleaned up?

 

Thanks

Hal German

APM Support