KB934756 - How to test notification settings after you configure e-mail notifications for a recipient or for a subscription in Operations Manager 2007

KB934756 (https://support.microsoft.com/?kbid=934756) has been released

 

 

INTRODUCTION

This article describes how to test the notification settings after you configure e-mail notifications in Microsoft System Center Operations Manager 2007.

 

MORE INFORMATION

After you configure e-mail notifications for a recipient or for a subscription in Operations Manager 2007, you may want to test the notification settings to verify that they are configured correctly. To do this, follow these steps.

 

Step 1: Create a task that logs an event to the event log

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure. However, they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

a.
Start the System Center Operations Manager 2007 Microsoft Management Console (MMC) snap-in.

b.
Click Authoring, expand Management Pack Objects, and then click Tasks.

c.
In the Actions pane, click Create a new task.

d.
In the Select the type of task to create tree, expand Agent Tasks, and then click Run a script.

e.
In the Select destination management pack list, click a management pack, or leave the Default Management Pack option selected, and then click Next.

f.
In the Task name box, type Test task 1, and then click Select.

g.
In the Look for box, type Windows computer, click Windows Computer in the Target list, and then click OK.

h.
Click Next, and then type testevent.vbs in the Name box.

i.
Type or paste the following code in the Script box.

 Set objSh = CreateObject("WScript.Shell")
'Write entry to the Application event log
objSh.LogEvent 4, "Operations Manager 2007 test event log entry written successfully." & chr(13)

j.
Click Create.

When this task runs, the following event is logged in the Application log:

Event Source: WSH
Event Category: None
Event ID: 4
Date: date
Time: time
Type: Information
User: N/A
Computer: ServerName
Description: Operations Manager 2007 test event log entry written successfully.

 

Step 2: Create an alert rule that is triggered by the event ID from the task

Create an alert rule that is triggered when the task writes event ID 4 to the Application log. To do this, follow these steps:

a.
In the System Center Operations Manager 2007 MMC snap-in, click Authoring, and then click Rules.

b.
In the Actions pane, click Create a rule.

c.
Expand Alert Generating Rules, expand Event Based, and then click NT Event Log (Alert) .

d.
In the Select destination management pack list, click a management pack, or leave the Default Management Pack option selected, and then click Next.

e.
In the Rule name box, type Test rule 1, and then click Select.

f.
In the Look for box, type Windows computer, click Windows Computer in the Target list, and then click OK.

g.
Click Next, leave the default Application entry in the Log name box, and then click Next.

h.
In the Value column that corresponds to Event ID, type 4.

i.
In the Value column that corresponds to Event Source, type WSH.

j.
Click Next, and then click Create.

k.
In the Rules pane, click Test rule 1, and then click Disable.

 

Step 3: Create a test subscription to match the alert
Step A: Create a test notification recipient

1.
In the System Center Operations Manager 2007 MMC snap-in, click Administration, expand Notifications, and then click Recipients.

2.
In the Actions pane, click New Notification Recipient.

3.
On the General tab, type the user to whom you want to send e-mail notifications. For example, type Example\Administrator.

4.
Click Notification Devices tab, and then click Add.

5.
In the Notification channel list, click E-mail.

6.
In the Delivery address for the selected channel box, type the recipient e-mail address, and then click Next.

7.
Click Next, type test e-mail notification device in the Notification device name box, and then click Finish.

8.
Click OK.

Step B: Subscribe to the alert

1.
In the System Center Operations Manager 2007 MMC snap-in, click Administration, expand Notifications, and then click Subscriptions.

2.
In the Actions pane, click New Notification Subscription.

3.
In the Subscription name box, type test subscription 1, and then click Add

4.
In the Notification Recipients list, click to select the check box of the test notification recipient that you created, and then click OK.

5.
Click Next four times.

6.
On the Alert Criteria page, click to select all the check boxes in the Alerts of any of checked severity box.

7.
In the AND any checked category box, click to clear all the check boxes except the Alert check box.

8.
Click Next two times, and then click Finish.

 

Step 4: Enable the event rule

Enable the rule that you created in the "Step 2: Create a rule that is triggered by the event ID from the task" section. To do this, follow these steps:

a.
In the System Center Operations Manager 2007 MMC snap-in, click Authoring, and then click Rules.

b.
In the Rules pane, click Test rule 1.

c.
In the Actions pane, click Enable.

 

Step 5: Run the task to generate the event

Run the task that you created in the "Step 1: Create a task that logs an event to the event log" section. To do this, follow these steps:

a.
In the System Center Operations Manager 2007 MMC snap-in, click Monitoring.

b.
Expand Monitoring, and then click Task Status.

c.
In the Actions pane, click Test task 1 under Windows Computer Tasks.

d.
In the Actions pane, click Enable.

e.
In the Run Task - Test task 1 dialog box, click Run.

f.
Verify that Succeeded appears next to Status in the Task Output box, and then click Close.

g.
Examine the Application log to verify that event ID 4 was written to the Application log.

h.
In the System Center Operations Manager 2007 MMC snap-in, click Active Alerts under Monitoring.

i.
Verify that a Test rule 1 alert appears in the Active Alerts pane.

Verify that the recipient received the notification e-mail message.
For more information about how to configure alerts, notifications, and subscriptions in Operations Manager 2007, visit the following Microsoft Web site:

https://www.microsoft.com/technet/prodtechnol/mom/opsmgr/webcasts.mspx (https://www.microsoft.com/technet/prodtechnol/mom/opsmgr/webcasts.mspx)