web viewfilter and select windows computer to allow operation manager windows computer objects to...

21
Create a Service Monitor and Custom Alert in SCOM 2007 R2 Monitors provide the basic functionality of monitor in SCOM. Monitors are stateful allowing you to set the state on a components based on conditional changes. This example demonstrates how to create a monitor and create a alert when the state of the ASP.NET State Service changes. This post can be applied to any windows service. In this example I have used the ASP.NET State Service. To create a monitor and to create a custom alert this post is broken down into the following sections: Create a Unit Monitor Create a recovery task for a critical health state Create a Custom Alert Test the Monitor and Custom Alert View the status in Health Explorer Create a Unit Monitor In a unit monitor you can define a list of states and allows you to detect these states. The unit monitor to create will be based on the windows services group on a basic service monitor. Basic service monitor monitors when a windows service changes state. To create a unit monitor, navigate to Authoring > Management Pack Objects. Right click Monitors > Create a Monitor > Unit Monitor… which brings up the ‘Create a unit Monitor’ dialog.

Upload: lamdieu

Post on 08-Feb-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Web viewFilter and select Windows Computer to allow operation manager Windows Computer objects to receive this monitor. ... select Target > DNS Name

Create a Service Monitor and Custom Alert in SCOM 2007 R2

Monitors provide the basic functionality of monitor in SCOM. Monitors are stateful allowing you to set the state on a components based on conditional changes. This example demonstrates how to create a monitor and create a alert when the state of the ASP.NET State Service changes. This post can be applied to any windows service. In this example I have used the ASP.NET State Service.

To create a monitor and to create a custom alert this post is broken down into the following sections:

Create a Unit Monitor Create a recovery task for a critical health state Create a Custom Alert Test the Monitor and Custom Alert View the status in Health Explorer

Create a Unit Monitor

In a unit monitor you can define a list of states and allows you to detect these states. The unit monitor to create will be based on the windows services group on a basic service monitor. Basic service monitor monitors when a windows service changes state.

To create a unit monitor, navigate to Authoring > Management Pack Objects. Right click Monitors > Create a Monitor > Unit Monitor… which brings up the ‘Create a unit Monitor’ dialog.

Page 2: Web viewFilter and select Windows Computer to allow operation manager Windows Computer objects to receive this monitor. ... select Target > DNS Name

In the Create a unit Monitor dialog expand Windows Services and select ‘Basic Service Monitor’. It is recommended not to use the default management pack.

Enter the name and description for the monitor being created. Click ‘Select…’ to bring up the ‘Select Items to Target’ dialog.

Page 3: Web viewFilter and select Windows Computer to allow operation manager Windows Computer objects to receive this monitor. ... select Target > DNS Name

A monitor target specifies what managed objects will receive this monitor and be monitored.

Filter and select Windows Computer to allow operation manager Windows Computer objects to receive this monitor. Click OK to close the dialog.

The parent monitor can be adjusted. By default for this monitor Availability is selected.

Page 4: Web viewFilter and select Windows Computer to allow operation manager Windows Computer objects to receive this monitor. ... select Target > DNS Name

Use the eclipse button to select the windows service to monitor.

Enter the computer name the windows service resides and select the windows service to monitor (this example monitors ASP.NET State Service). Select OK.

Page 5: Web viewFilter and select Windows Computer to allow operation manager Windows Computer objects to receive this monitor. ... select Target > DNS Name

Select Next to continue.

The health state of the monitor conditions can be adjusted. In the default setup, a critical state is set when the windows service is stopped, otherwise it will be healthy. Select Next.

Page 6: Web viewFilter and select Windows Computer to allow operation manager Windows Computer objects to receive this monitor. ... select Target > DNS Name

Select ‘Generate alerts for this monitor’ checkbox. This will generate an alert when the ASP.NET State Service is stopped. Create an alert description by selecting the eclipse button, select Target > DNS Name.

Page 8: Web viewFilter and select Windows Computer to allow operation manager Windows Computer objects to receive this monitor. ... select Target > DNS Name

Click Create to save the alert.

Refresh the monitor pane and you can drill down to view the newly created unit monitor.

Page 9: Web viewFilter and select Windows Computer to allow operation manager Windows Computer objects to receive this monitor. ... select Target > DNS Name

Create a recovery task for a critical health state

To create a recovery task for a critical health state right click the unit monitor and select Properties.

Select the Diagnostic and Recovery tab and in the Configure recovery tasks section select Add… > Recovery for critical health state.

Page 10: Web viewFilter and select Windows Computer to allow operation manager Windows Computer objects to receive this monitor. ... select Target > DNS Name

In the ‘Create Recovery Task Wizard’ select ‘Run Command’ and click Next.

Enter and Recovery name and description. Ensure both options ‘Run recovery automatically’ and ‘Recalculate monitor state after recovery finishes’ are selected and click Next.

Page 11: Web viewFilter and select Windows Computer to allow operation manager Windows Computer objects to receive this monitor. ... select Target > DNS Name

Specify the command line to execute as:

%windir%\system32\net.exe

and the start parameters as:

start aspnet_state

In this example I change the timeout to 30 seconds.

Page 13: Web viewFilter and select Windows Computer to allow operation manager Windows Computer objects to receive this monitor. ... select Target > DNS Name

Create a Custom Alert

Navigate to Monitoring > Management Pack Name, right click and select New > Alert View.

Select the eclipse button to select the management object to create the alert on.

Page 14: Web viewFilter and select Windows Computer to allow operation manager Windows Computer objects to receive this monitor. ... select Target > DNS Name

Select the condition of the alert as ‘created by specific sources’. Next select the ‘specific’ link under the Criteria description area. In the Alert Source dialog select the monitor created in the previous steps. Click OK.

Page 15: Web viewFilter and select Windows Computer to allow operation manager Windows Computer objects to receive this monitor. ... select Target > DNS Name

Select another alert condition ‘with specific resolution state’ and click the ‘specific’ link in the Criteria description area.

In the Resolution State dialog, select the option ‘Select only specific Resolution State’. From the drop down select ‘Not Equals’ and enter the number 255 (Closed). Click OK.

Click OK to create and save the alert.

Page 16: Web viewFilter and select Windows Computer to allow operation manager Windows Computer objects to receive this monitor. ... select Target > DNS Name

The newly created alert will be visible under your management pack.

Test the Monitor and Custom Alert

To test the monitor and alert open services and stop the ASP.NET State Service.

Page 17: Web viewFilter and select Windows Computer to allow operation manager Windows Computer objects to receive this monitor. ... select Target > DNS Name

Navigate back to Operations Manager and view the alert.

The recovery task automatically states the ASP.NET State Service windows service.

View the status in Health Explorer

The window state change history can be viewed in Health Explorer.