OpsMgr 2007 Notifications – issues, customizations

There is a couple of things about OpsMgr 2007 notifications, that may not be so obvious at first sight. Here is a list from my experience.

1. Notifications audit trail

So you want to have a trace left about what notification was sent to whom? This is not performed by SCOM out of the box.

My suggestion is to use a command-line notification channel as described by Stefan http://weblog.stranger.nl/using_opsmgr_notification_channels or Steve http://blogs.msdn.com/steverac/archive/2008/03/14/command-line-notifications-and-variables.aspx.

Additionally I like to know to whom it was sent, so I snatch the information on that from Clive’s blog:http://blogs.technet.com/cliveeastwood/archive/2007/10/12/a.aspx

and insert it into the event description: $Data/Recipients/To/Address/Address$

Another but similar approach is to log to a text file: http://contoso.se/blog/?p=265

2. Subject encoding

If you have a malformed subject line, this is most often due to the fact that the <SubjectEncoding> flag in XML and that the subject is over the limit for SMTP. With SP1 you can check the checkbox under subject in notification format. If you don’t have SP1 you need to export the MP Microsoft.SystemCenter.Notifications.Internal and manually edit the file by removing <subjectEncoding> flag under the subject body.

3. HTML Mail body

You want to add HTML formating to the mail body? Again play with the XML this way (remember to set the IsBodyHtml to true), e.g.:

      <WriteActionModuleType ID=”DefaultSmtpAction” Accessibility=”Public” Batching=”false”>
        <Configuration />
        <ModuleImplementation Isolation=”Any”>
              <ConditionDetection ID=”ContentGenerator” TypeID=”Notification!Microsoft.SystemCenter.Notification.SmtpNotificationContentGenerator”>
                  <Subject>SERWER:$Data/Context/DataItem/ManagedEntityPath$ PROBLEM:$Data/Context/DataItem/AlertName$</Subject>
YOUR HTML Mail body goes here

Tip for the URL – tricky with quotes:

<tr><td> URL for SCOM Console:</td><td> <a href=’$Target/Property[Type=”Notification!Microsoft.SystemCenter.AlertNotificationSubscriptionServer”]/WebConsoleUrl$?DisplayMode=Pivot&amp;AlertID=$UrlEncodeData/Context/DataItem/AlertId$’> Details of Alert in OpsMgr console</a></td></tr>


4. Mail priority

If you want to play with mail priority use Stefans’ hints: http://weblog.stranger.nl/opsmgr_email_notifications_with_high_importance

The issue with modifying the Notification MP from XML level is to remember that you cannot modify it in the GUI (the relevant part only) as the wizards will overwrite the parts that are not exposed in the OpsMgr UI.

5. Targeting notifications to single alert

If you have a request to add a single notification you can use the attached script that bases on solution from Stefan Koell: http://code4ward.net/cs2/blogs/code4ward/archive/2007/09/19/set-notificationforalert.aspx. II wanted to be able to set subscriptions for different recipients, not always the same. The problem is that using a console task you cannot ask user for input, so I just slightly modified it into a standalone script:

Just use SetNotificationForAlert.bat.

Happy Easter to all:)

Attachment(s): SetNotificationForAlert.zip


~ by alipka on March 22, 2008.

5 Responses to “OpsMgr 2007 Notifications – issues, customizations”

  1. hi sir,
    I need help on this above of 3.point that is HTML MAIL Body. i have used and insterted the HTML code in that but it is not working; When see on XML file i see in a Grey Color text btween the CDATA it is not processing it. how this can be done please give and details step how it can done

    • Does your MP go through MPverify.exe check? If no, what is the error you get? It can be a simple typo you make. Go check your MP with MPverify.exe. If it succeeds then try to import (remember to back up). If import fails check the error message, the import does basically what MPVerify does but checks against imported MPs in you OpsMgr server.

  2. hi sir
    Thanks for your Help.

  3. Hi Sir.
    There is one more Query WE have installed the SCOM agent using certificate. the Computer we are monotoring is outside the Domain. They have not given an right for login so we are not able to see the EVentLOG of computer. Is there any SCript or Way so this can solve the problem

    • Since this is a workgroup/standalone computer you cannot add domain groups or users to the computer local groups or grant it any kind of privileges – this computer is unaware of the domain. The only solution I am aware of is to set the local admin password to the same you have on the computer from which you are managing it. Since the SID of local admin account is always the same you will be able to open the log on the remote standalone computer if you use the local admin account (with the same password) from your management computer.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: