Stuart's profileStuart Renes: The BlogPhotosBlogListsMore Tools Help

Blog


    February 13

    Who's watching your MOM Server?

    If you support a large MOM infrastructure (one with large numbers of agents), you may have noticed that despite the auto-restart settings on your DAS MOM service, it ocassionally winds up in a stopped state. Once the service is stopped, MOM can't do any alerting on either its agents or itself so you could potentially wind up with an unmonitored environment for quite a while.
     
    To solve this problem, I've created a MOM Service Monitor that continually monitors the state of the MOM service on the DAS server and restarts it if it stops.
     
    The links below point you to the code and registry settings you'll need to implement this on your MOM DAS server(s). The code is written in VBscript and it runs as a Windows service courtesy of the SRVANY tool found in the Windows Resource kit. The service wakes up every 5 minutes (configurable in the script) and checks to see if the MOM service is in the "Stopped" state and set to "Automatic".  If so, it restarts the MOM service and writes an entry into the Application event log that you can monitor with a MOM rule.
     
    If you need to keep the MOM service stopped for some maintenance activity just set its start state to either "Manual" or "Disabled" and the MOM Service Monitor won't attempt to restart it.
     
    Here are the steps to get this service installed on your MOM DAS server(s):
     

     Here is what you need to do:

    • Download and install the Windows Resource Kit for your DAS Server OS platform. The free Windows Resource Kit from Microsoft includes two useful tools (INSTSRV and SRVANY) that easily enable any console application to run as a service.
    • Verify that the cscript.exe tool is installed at C:\WINDOWS\system32\cscript.exe on the DAS server
    • Verify that the INSTSRV.EXE and SRVANY.EXE tools are now installed at C:\Program Files\Windows Resource Kits\Tools on your DAS server
    • Extract the MOMServiceMonitor.zip archive to C:\Program Files\MOM Service Monitor\ on your DAS server
    • Install the SRVVANY program as a service named MOM Service Monitor on the DAS server by running the included Install MOMServiceMonitor.bat file
    • Install the required DAS Registry modifications by clicking on the included MOMServiceMonitor.reg file
    • Start the MOM Service Monitor service from the Windows Services applet and verify it stays in the "Started" state
    • Stop the MOM Service on the DAS server and verify that it restarts within 5 minutes
    • View the associated WSH event in the DAS server Application log
    • (Optional) Create a MOM event rule that alerts on the presence of the above WSH event so you'll know when the MOM Service Monitor service restarted the DAS server MOM service

     Link to Installation files for the MOM Service Monitor:

    MOM Service Monitor Source