WebMon: A SCOM Management Pack for Basic Web Site Monitoring, Configured with a Single XML File, Part II
August 22, 2009 17 Comments
The WebMon URL Monitoring management pack that I described in the previous post, can be downloaded here. Notes on deploying and configuring the MP are as follows:
This management pack for SCOM 2007, is intended to provide basic web monitoring for multiple web sites while being very easy to deploy. All configuration for each monitored URL is performed by editing a single XML file on the Watcher Node. The management pack implements three classes: 1) WebMon Watcher Node, which hosts 2) WebMon Request and 3) WebMon Secure Request classes. The Request and Secure Request classes are identical, except the Secure Request class utilizes NTLM/Integrated authentication through a RunAs profile. The monitors and rules implemented are as follows (for each of the two request clasess):
- DNS Resolution Failure
- Status Code (greater than a threshold)
- Error Code
- CA Untrusted
- Certificate Expired
- Certificate Invalid
- Response Time (greater than a threshold)
- Response Time Performance Collection
The monitors are rolled-up into an aggregate monitor used for alerting for each Request class. A set of views are also created under the Web Application folder in the Monitoring section of the SCOM console. These include state views for the Watcher Nodes, two Request classes, and a performance view displaying the historical response time for all requests.
The advantage of this management pack over the SCOM the Web Application monitoring implementation for basic web monitoring is that it can be rapidly deployed and configured by simply editing the XML configuration file.
Deployment and Configuration:
To deploy the WebMon URL Monitoring Management Pack:
- Copy the sample webmonconfig.xml to a location on a local disk drive of each node intended to be a watcher node (the default path is C:\webmon\webmonconfig.xml)
- Edit the configuration file with the desired settings (see the XML configuration section below)
- Import the WebMon.xml file using the Import Management Pack function in the Operations Manager console, under administration
- Access the Authoring section of the Opeartions Manager console, click the Change Scope link and limit the scope to WebMon Watcher Node.
- Right click the “WebMon Discovery” object under “Discovered Type: WebMon Watcher Node,” and choose Overrides->Override the Object Discovery->For a Specific Object of Class: Windows Server. Select the server designated as Watcher Nodes, and override the object discovery to be “enabled.”
- If the webmonconfig.xml file is deployed to a non-default location, override the script arguments and update the first parameter (c:\webmon\webmonconfig.xml) to reflect the actual script location.
- The default interval for the object discovery is 15 minutes. If this needs to be changes, edit the properties of the WebMon Discovery object, and adjust the schedule accordingly.
- If any sites are to be monitored with NTLM/Integrated authentication, a RunAs Profile must be configured.
- Create a new RunAs account to be used by the watcher node, or determine an existing account to use.
- In the Administration section of the Operations Manager console, click RunAs Profiles. Edit the properties of the WebMon Request RunAs Profile.
- Assign a RunAs account for the designated Watcher Node
All configurable elements of the WebMon URL Monitoring Management Pack can be set in the webmonconfig.xml on the Watcher Node. Multiple requests can be defined in the configuration file by adding another <request/> element. The discovery script performs some basic validation, but the XML configuration should be edited carefully in order to prevent inadvertent errors due to invalid configuration.
The XML configuration file looks like:
<?xml version=”1.0″ encoding=”utf-8″?>
The configuration elements are:
- requesturl: the URL of the request, either http:// or https://
- responsetimethreshold: the response time threshold in seconds , if this is surpassed, a warning alert will be generated
- retrycount: the number of attempts to retry the request, 0 or greater
- pollinginterval: the interval in seconds between requests
- statuscodevalue; an error alert will be generated if the reponse status code is greater than this value
- usentlm: input true for this value if the site requires NTLM authentication. The credentials used are defined in the WebMon Request URL RunAsProfile
Using the Management Pack
For both the WebMon Request and WebMon Secure Request classes, aggregate monitors are configured to generate alerts if any of the monitors trigger a warning or error health state. Health states can be viewed in the Monitoring section of the Operations Manager Console, under the Web Application\WebMon URL Monitoring folder. The views include state views for the WebMon Watcher Node, WebMon Request, and WebMon Secure Request classes as well as a view to display the collected response time data for all of the URL requests. While overrides on the individual monitors can be configured, configuration should be performed in the webmonconfig.xml file.
Notes on Editing the Management Pack
Prior to editing the management pack, please reference the link below to read more about the design of this management pack. Due to some issues with the way the Authoring Console handles MonitorTypes and the use of variables in some configuration elements, all edits should be made in an XML editor.
Support and More Info
This management pack is provided as-is, with no implied or explicit warranty. For more info about the design and development of this management pack, reference: https://operatingquadrant.com/2009/08/22/webmon-a-scom-management-pack-for-basic-web-site-monitoring-configured-with-a-single-xml-file-part-i/