[Fuller08] 14.3.3. Windows Service Monitor

来源:百度文库 编辑:神马文学网 时间:2024/04/28 08:37:27
Windows Service Monitor
AWindows service monitor does what the name suggests. It monitors aWindows service and updates the status of the monitor based on whetherthe service is running or not. You can also monitor a Windows servicewith a management pack template (explained inChapter 18, “Using Synthetic Transactions”) that creates a Windows service monitor.
Usingthe management pack template creates a class for the monitored service.This is useful when you want to monitor the service as an individualitem and potentially add it to a distributed application (DA). We coverdistributed applications in more detail inChapter 19, “Managing a Distributed Environment.”
Not All Services Show Up When Using the Monitor Wizard
When you use the Monitor Wizard to create a monitor for a Windows service, you can browse to see the services available for monitoring. However, you may notice that the list is shorter than the list of services in the Services MMC (Microsoft Management Console). The reason for this is that this version of OpsMgr only monitors services that are not shared. If a service is shared, it runs under svchost.exe and it is not picked up by the wizard.
This is a known problem. If you are developing your own services in house, ask your developers to create separate services for their applications so you will be able to monitor them.
Wewill step through the process of creating a Windows service monitorthat monitors the Print Spooler service. Perform the following steps:
1.
Open the Operations console and navigate to the Authoring space.
2.
Expand Monitoring Objects and right-click Monitors. Select Create a Monitor -> Unit Monitor....
3.
The Create a Unit Monitor Wizard displays the screen shown in . From this screen, select Windows Services -> Basic Service Monitor. Also, select the Sample Management Pack as a target for the monitor. Click Next to continue.
Figure 14.25. Select Basic Service Monitor.
[View full size image]

4.
On the next screen, we name the rule and configure a target for it. For our example, we will call the rule Print Spooler Service Monitor and we will target the Windows Server class, because we want the rule to apply to all Windows Servers. Notice here, unlike when we named rules, we are asked to specify the parent monitor. In this case, we will leave the setting at the default of Availability. shows the completed General Properties screen. Click Next to continue.
Figure 14.26. Service monitor creation name screen.
[View full size image]

5.
Now, we will configure the service we want to monitor. In this case, it is the Print Spooler (Spooler) service. You can either click the ... button to browse for the service or type Spooler into the service name box. Click Next.
6.
The next screen is the Configure Health screen. This is where you define what the health of the monitor will be in relation to the state of the service. Because this is a basic service monitor, it is already correctly defined (see ).
Figure 14.27. Select the health state for a service monitor.
[View full size image]

7.
The final screen of the wizard configures the actual alert OpsMgr will generate. We will tick the Generate alerts for this monitor check box, leave the alert name as it is, and add an alert description, as shown in . We will also leave the check box enabled for Automatically resolve alert when.... This means that once the monitor returns to a Healthy state, any generated alerts are automatically resolved. Click Create to create the new service monitor.
Figure 14.28. Generate alert screen for a basic service monitor.
[View full size image]

Monitoring a Process with OpsMgr
Sometimes you may want to know if a process (not a service) is running on a server. This scenario is common for functions such as batch processes, which often run logged in to a console as a specific user and are launched using a shortcut on the desktop. We have created a custom management pack that provides alerts when a process is not running within an acceptable range of occurrences that you specify. That is, if MyBigApp.exe is not running at least once on the specified server, OpsMgr generates a critical alert; if it is running too many times, OpsMgr will create a warning alert.
We include the Process Monitor as part of the OpsMgr Unleashed management pack accompanyingChapter 23, “Developing Management Packs and Reports.” Note that in the management pack, the monitor is disabled by default and is designed to be disabled. If you enable the monitor using the default configuration, it alerts on every server if either too few or too many svchost.exe processes are running on the system; therefore, do not enable the monitor. You will want to activate its functionality on a per-server basis through overrides. You can specify the acceptable number of processes and the name of the process on the parameters page for the monitor.

Create Bookmark (Key: b)Create Bookmark
Create Note or Tag (Key: t)Create Note or Tag
Download (Key: d)Download
PrintPrint
Html View (Key: h)Html View
Zoom Out (Key: -)Zoom Out
Zoom In (Key: +)Zoom In
Toggle to Full Screen (Key: f)
Previous (Key: p)Previous
Next (Key: n)Next
Related Content

Windows Reliability and Performance Monitor
From: Windows Server® 2008 Unleashed
Monitoring Server Performance and Network Connections
From: Sams Teach Yourself Windows® Server 2008 in 24 Hours
Monitoring Users
From: Juniper Networks® Reference Guide: JUNOS™ Routing, Configuration, and Architecture
System Monitoring
From: Practical VoIP Using VOCAL
Monitoring
From: Understanding and Deploying LDAP Directory Services, Second Edition
Performance Monitoring
From: Microsoft® Exchange Server 2003 Delta Guide
Monitoring
From: SAMS Teach Yourself Networking in 24 Hours
System Management and Monitoring
From: SUSE® LINUX® Enterprise Server 9 Administrator's Handbook
Configuring Monitoring
From: Microsoft® Windows® Small Business Server 2003 Administrator's Companion
Managing and Monitoring
From: Enterprise Integration Solutions