Home > SCOM 2012, System Center Family, Tips&Tricks > Customizing Subject and Body Fields in SCOM 2012 E-Mail Notifications

Customizing Subject and Body Fields in SCOM 2012 E-Mail Notifications

More and more people are reviewing SCOM e-mail notifications on mobile devices rather than traditional desktops and laptops. The default syntax is not so much confusing as it is difficult to read. One thing I found problematic was the first part of the Subject field in the e-mail is the Name of the alert, not its Status.

Chances are the preview displayed on most mobile devices is truncated or cut off. You won’t know if the e-mail is notifying you there is a new problem or that an existing problem has been resolved. This is kinda’ a big deal if you’re the person on-call, awaken out of a sound sleep.

IMHO, first glance of a notification should reveal its status: New, Closed, Assigned etc. Good news is the change is easy:
Launch the SCOM 2012 Console / Administration / Notifications / Channels
Double-click the appropriate ‘Channel’ and click on ‘Format’
Click in the field ‘E-mail subject:’ and copy the contents into Notepad. The following is the default syntax.

Alert: $Data[Default=’Not Present’]/Context/DataItem/AlertName$ Resolution state: $Data[Default=’Not Present’]/Context/DataItem/ResolutionStateName$

It looks like a single long string but its actually two strings separated by a single space:Alert Name Status
Alert Name – Alert: $Data[Default=’Not Present’]/Context/DataItem/AlertName$
Alert Status – Resolution state: $Data[Default=’Not Present’]/Context/DataItem/ResolutionStateName$

Simply swap them:

Resolution state: $Data[Default=’Not Present’]/Context/DataItem/ResolutionStateName$ Alert: $Data[Default=’Not Present’]/Context/DataItem/AlertName$

You can also replace ‘Resolution state’ and ‘Alert’ with any description of your choosing as well as add some additional formatting. For example:

STATUS: $Data[Default=’Not Present’]/Context/DataItem/ResolutionStateName$ || PROBLEM: $Data[Default=’Not Present’]/Context/DataItem/AlertName$

The resulting e-mail subject will read:

STATUS: Closed || PROBLEM: Failed to Connect to Computer

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: