Create test alert in SCOM

Posted by

There is no standard feature in SCOM to generate a test alert, which can be needed to test a mail subscription.
For SCOM2007 there is a simple tool to generate test alerts. Too bad that this tool doesn’t support SCOM2012.
If you are using SCOM2007 you can download the tool here: http://blogs.technet.com/b/momteam/archive/2009/05/19/notifications-test-tool.aspx

For the SCOM2012 users we can generate a test alert with a Microsoft Event log event.
First we need to create an event log entry. This can be done with PowerShell or a CMD Command.

Create event in Windows Event log

I’ve done this with the standard EventCreate command in CMD.
eventcreate /L Application /T information /ID 999 /D “This is a test event” /SO TestEvent

If you want to create a daily test event, this can be scheduled in task scheduler.

Sample parameters:
– Run whether user is logged on or not
– Run with highest privileges
– Program/script: eventcreate
– Arguments: /L Application /T information /ID 999 /D “This is a test event” /SO TestEvent

Create an Event Monitor in SCOM

  • Go to the Authoring tab -> Monitors -> Create a unit monitor.
  • Create a new management pack: “Test event management pack” Or use (not the default) a other unsealed management pack.
  • Choose Windows Events -> Simple event detection -> Timer reset.
  • Give it a name, and select the target. I’ve chosen the “Operations Manager Management Server Computer Group” because i generate the test event on my SCOM Management server.
  • I’ve chosen the “configuration” parent monitor because this is a typical configuration thing.
  • Select the event log we are monitoring for the event.
  • Next, type the Event ID (999) and the Source (TestEvent).
  • Configure the timer when the test alert can be closed.
  • Configure the Severity and Priority and Select the “Generate alerts for this monitor” box.

Now you can test Alerts with running the scheduled task or run the command in the DOS prompt.

2 comments

  1. As i understood it is not working for Events on the Server2 created by server1. So scom may be checking Event computer and resource computer?
    I did test, scom very faster found Events created server1 on it, but using thats Events on another server where target class win computer, scom not found …
    Resault you know.

Leave a Reply

Your email address will not be published. Required fields are marked *