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”>
<ConditionDetection ID=”ContentGenerator” TypeID=”Notification!Microsoft.SystemCenter.Notification.SmtpNotificationContentGenerator”>
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&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:)