Can MOM Make a Sound or Produce a Popup When a New Alert Arrives?
Goto the MOM Home Page

Does any of you know of a way to generate a sound or display a popup window on the workstations of the administrators every time that a new alert arrives in MOM?

Contributed By: Michael T La Rivière {MS}
I can think of a few ways to do this.

You can create an alert processing rule that runs a batch file containing the following command on either the agents or the consolidator:

@echo ^G

The "^G" control code is made by pressing ctrl+P, followed by ctrl+G in the DOS Edit program.  If you are not working on or at least near the consolidator or agent computer, this doesn't really help you.

You can also create a script or small app that uses the MOM WMI classes to check for new alerts.  It would run on any computer that can call the objects remotely.  It could notify you in several ways.  The Microsoft Speech API (SAPI) controls can even be used to read out the alert details, if you wanted more than a simple beep or messagebox:

Option Explicit

Dim objVoice
Dim objAlerts, objAlert
Dim strMOMServer, count

strMOMServer = "momserver"
count = 0

Set objVoice = CreateObject("SAPI.SpVoice")

If objVoice Is Nothing Then
     WScript.Echo("Could not create SAPI object. SAPI may not be
End If

While (True)

    Set objAlerts = GetObject("WinMgmts://" & strMOMServer &
"\root\MOM").ExecQuery("SELECT * FROM MSFT_Alert WHERE ResolutionState=0")

    objVoice.Speak("Found " & objAlerts.Count & " new alerts.")

    For Each objAlert In objAlerts
        count = count + 1

        objVoice.Speak("Details for alert number " & CStr(count))
        objVoice.Speak("  Alert name: " & objAlert.Name)
        objVoice.Speak("  Alert severity: " & CStr(objAlert.Severity))


    count = 0


Have fun.

© 2003 - 2008

Goto the MOM Home Page

Email the Author