Overview
Monitoring a service in SCOM is very easy to set up – thankx to the Windows Service Management Pack Template. Many times there is a Management Pack already created that you can import to monitor a service (Active Directory, SQL Server, etc.) When there is no Management Pack available for a Specific Service, or one is too complex for your environment, you can use this template to configure monitoring. This quick process will create the Monitors and Rules necessary to:
- Verify the service is running, and alert when it is stopped
- Alert when performance thresholds are met
- Collect performance data (% processor time, )
Setting up the Service for Monitoring
- Go to the Authoring workspace in the SCOM Console.
- Right-click anywhere in the Management Pack Templates node, and select Add Monitoring Wizard.
The Add Monitoring Wizard will launch. - On the Monitoring Type page, select Windows Service.
- On the General Page:
Provide a Name for the Service.
Optionally provide a Description.
Select an existing Management Pack, or click the New button to create a new Management Pack to add the monitoring objects to.
- On the Service Details Page:
Provide a service to monitor. Type in the Service Name, or click on the ellipsis button to bring up a Window from which you can select a Service.
If you type in the name, you can find the Service Name when looking at the Service Properties in the Services Console.
If you want to select the Service from a list of installed services, click on the ellipsis button. The Select Windows Service window will appear. You can look through and select a service installed locally, or connect to a different computer if the desired service is not installed locally.
Select a group to Target monitoring of this service to.
Select whether you want to monitor the service only if its Startup Type is Automatic.
- On the Performance Data page, you can specify whether you want alerts generated when CPU or Memory usage exceeds a specific threshold.
In the Perofrmance counters section, check the box to generate an alert for CPU and/or Memory usage, and provide the thresholds you want to be alerted on.
In the Performance counter sampling section, specify the number of samples in a row that have to exceed the threshold in order to generate an alert, and the sampling interval.
Be careful with how frequent your sample interval is – the lower the internal, the more space it will use in the database.
- The Summary page provides a summary of the service monitoring configuration you have provided. Review the details and click Create to set up the Service Monitoring for the Service, or the Back button to make any changes to the configuration.
Making Changes to the Configuration of the Windows Service
If you need to make and changes to the monitoring configuration for the Windows Service:
- Go to the Authoring workspace in the SCOM Console.
- Navigate to Authoring – Management Pack Templates – Windows Service.
- Right-click the service and select Properties.
- The Service Properties window will appear, where you can reconfigure the monitoring for the service.
A Look at What the Template Does
Using the Windows Service Management Pack Template is a quick and easy way to configure Monitors and Rules.
To see the objects configured using the template, right-click on the service and select View Management Pack Objects – <Object Type>.
When viewing the Rules, note that there are six Rules, including ones to collect CPU and Memory performance data.
One of the really nice things about using the template is that the Collect Process\%Processor Time Rule is configured to account for multi-CPUs. Note the ScaleBy property, which will take the % Processor Time value and divide it by the number of logical processors.
This is necessary because the Performance Counter does not take multiple CPUs into consideration. While you think the maximum value for % CPU Time is 100%, The actual maximum value is 100 times the number of logical processors. If you had created your own Performance Collection Rule, there is no way to add the ScaleBy option – other than manually editing the Management Pack’s XML.
There are also a number of Monitors created for you: to alert when service is not running, or when CPU/Memory performance thresholds have been met.
Creating a View to Display Performance Data
You may want to create a View to display CPU or Memory usage data that is being collected now.
- Go to the Monitoring workspace.
- Navigate to the folder named for the Management Pack you want to create the View in.
(If you create a view in the root level of the Monitoring node, it will be created in the Default Management Pack – which you do not want to do.) - Right-click on the folder and select New – Performance View.
- The Properties window will appear.
Provide a name for the View.
Click the ellipsis button next to Show data related to. The Select Items to Target window will appear. Select the name of the Windows Service that you created.
Under Select conditions, check the box labelled collected by specific rules.
Under Criteria description, click on the word specific in collected by specific rules. Select the name of the Rule that collects the performance data (in the case for CPU usage, select Collect Process\% Processor Time.)
- You can now review the performance data for the service. As with any performance view, select the items (computers) from the legend that you want to appear on the graph.