Monday 28 April 2008

MoM (Microsoft Operations Manager) Design

We have been using MoM (Microsoft Operations Manager) in our BizTalk projects for operational support purposes. I am already very much impressed with the advantages it provides for any Wintel applications in its production support arena. Few months back I got an opportunity to design another MoM package for a messaging product based out of Java for Windows environments. The messaging product has been in use for nearly a year in our customer’s production environment.

When I mean by messaging product, we can’t not compare its capabilities with BizTalk, as it doesn’t perform any business processing upon the messages while transferring the messages. But its intended objective is to just transfer very large files in very high frequency to different platform like UNIX, Mainframe etc. This product is yet to evolve in many ways for an enterprise usage as we all know no application is complete in this universe.

Our customer was already using an in-house operational tool to handle transfer failures (and also to handle the products open issues). This product has very minimal capability in throwing/publishing the exceptions (file transfer failures). Any transfer failures from this product would be simply logged in the event log with same Event ID, Event Category, Event Source and the only difference is the description of the error. Our customer is using an alert monitor tool, which provides the dashboard sort of view to the 1st line support. So, all the operation tools should provide their output to dashboard tool. They call that tool as Mangers of Manger.

Current system architecture

Exceptions in this messaging scenario can be like:

· File not found at source.

· Configured pattern of files are not available for transfer.

· Configured file path / server unavailability.

· File has been occupied by another process

· Server disk space full

· Staging folders maintenance issues

· Many product related issue

· Unknown.

Currently used operational tool doesn’t have the intelligence to classify the exception and act accordingly/show the classified alerts to the Monitoring tool. So the challenge is to create an efficient MoM-package which would identify the different categories of the alerts and give the output accordingly to the Managers of manager tool.

I have classified the exception as below:

Exception Classifications

The exceptions are classified into different category since each category requires different actions:

  • Subscriber issues require Call-out to the Subscriber production-support team.
  • Messaging service issue requires Call-out to our production team.
  • Product issue requires some workarounds which can be automated again using MoM.
  • Off course we can’t always capture all the exceptions, so a generic catch to capture these exceptions also and throw them with lower severity to the monitoring tool.

In MoM with its ability to use custom scripts, I have configured the categories of the exceptions, by throwing them with Custom Exception Number and Custom event description lets say exception category appended at the starting of the every event description. So I have configured a generic alert called “Event-Filter” which swallows all events from the application. In the event-filter I have used a script which would read the event description and in turn throws another alert with different event ID(specific to category) and the event category append in the event description. For example: if the exception is “File not found”

The messaging product would throw the exception as following in the event log:

Event Type : Error

Event Source : ABCD

Event Category : None

Event ID : 123 (Always same for all error)

Date : 28/04/2008

Time : 15:21:48

User :

Computer : DummyMach123

Description : Files not found at the configured path \\mshsrmsappp0008\P1102747\TestFile.txt>

This event log would be swallowed by the Event-Filter script to throw a MoM event:

Event-ID: 1001 (Custom defined)

Event Category: Subscriber

Event-Decription: Event_Category [Subscriber]: Files not found at the configured path file:////mshsrmsappp0008/P1102747/TestFile.txt

And for the alerts which came out of the event-filter I have configured a rule to action the category related actions. So the new MoM-package would enable the application to behave something like the following:

New MoM package

Following is the part of the event-filter script which is in if-condition, checks the event description and calls another function (CreateEvent) to throw the event with different event criteria’s.

If InStr(strParentEvtDesc,strSCNoMatchPattern) Then

'match the pattern

strParentEvtDesc= strECSubscriber & objContextEvent.Message

CreateEvent EVENT_ID_NoMatchPattern,EVENT_TYPE_ERROR,SCRIPT_EVENTSOURCE,strParentEvtDesc

Elseif…

Following is the method used to throw the event from event-filter:

Sub CreateEvent(intEventNumber,intEventType,strEventSource,strEventMessage)

Set objEvent = ScriptContext.CreateEvent()

objEvent.EventSource = strEventSource

objEvent.EventNumber = intEventNumber

objEvent.EventType = intEventType

objEvent.Message = strEventMessage

ScriptContext.Submit objEvent

End Sub

Following is the event rule in MoM for the subscriber related issue and marked is the criteria for the rule:

clip_image002

As you would have noticed, in the new-MoM package design diagram (showed above) I have showed a XML- file next to the subscriber issues box. Okay I am able to classify the exceptions and now what I am going to do with it? If it’s a subscriber related issue, as I mentioned earlier we want throw a MoM alter which would contain the details of the specific subscriber. I am going to maintain the subscriber contacts in the XML file which can be used a configuration file for the alert for my subscriber related issues. How I am going to accomplish this requirement? We will see it in another day.

Special Thanks to Mr.Lee Nichol for whatsoever little knowledge I have in MoM