Server Management Suite

 View Only

How to Create a Monitor Pack, Category, Metric, and Rule - Part 2 

Feb 06, 2008 01:49 PM

Welcome to Part 2. In this article, you will find out how to create a new Rule, how to associate it with a Metric, and how to add actions to this Rule. Finally, you will see the resulting outcome when Part 1 and Part 2 are enabled.

All of the following actions take place in the "Tasks > Monitoring > Monitor Solution" Tasks Folder within the Altiris Console.

New Rule

  1. To create a new Rule, go to the "Manage Monitor Packs" Task page, double-click the Monitor Pack in question, select the "Categories Tab", double-click the relevant Category, select the "Rules Tab", and then press the blue plus sign to create a new Rule.
  2. The "Rule Configuration" page requires that the Rule be given a name, a Definition and a Rule Repetition. The Rule Repetition is comprised of a Timed Threshold (how often will the Rule run) and a Repeat Count (how many times will the Rule run within its threshold). This example shows that the Rule will run twice within a three minute period. The Polling Interval causes the Rule to be evaluated at that frequency (this value is brought in by the Metrics Polling Interval). If the Rule evaluation is True twice in this three minute period, then the Rule triggers generating Alerts.

    To create a Rule Definition, press the "New..." button, which will open the "Configure Rule Metric" page.

    As this example bases its Rule off of a Metric, the custom Metric that was created earlier needs to be selected from the Metric dropdown list. The Metric is using the TinyGet tool to interrogate the Default WebSite in order to receive a "HTTP 200 OK" message. If any value other than 200 is returned, then this Rule will be triggered.

  3. Pressing the OK button will add the definition to the Rule.

New Action

  1. Now that a Rule has been created, an Action can be created with which will be executed when the Rule is triggered. To create an Action, select the "Action Tab" and then press the "New.." button. A pop-out menu will appear, allowing for an Action type to be chosen. Please note that a Rule does not necessarily require a Configured Action, but it does at least need a Display State. This example makes the Rule reset its state once it has received an expected value. As the Metric is checking a web Server, the Rules Display State will be Critical. Its first Action will restart the WWW Service.
  2. Its second Action will be to create an Incident.
  3. Its third and last Action will be to start the Default WebSite, using the following command:
    cmd.exe /C "cscript.exe C:\Inetpub\AdminScripts\adsutils.vbs START_SERVER W3SVC/1"
    
    
  4. Pressing the OK button adds each Action to the "Configured actions" section.
  5. Before pressing the OK button to save this Rule, the "View XML" button to ensure that your settings are correct.

End Result

The Metric uses the TinyGet tool to regularly check to see if the Default WebSite is available by expecting a "HTTP 200 OK" message. If it receives any other response, then its Rule is triggered, which first restarts the WWW Service, creates and Incident, and then starts the Default WebSite.

If the "Monitor Solution Dashboard" is open when this happens, then it will look something like this:

As the Rules Action Reset State is set to "Update metric value", the Critical Display State will return to Normal a minute or so after the Rules Actions have run.

If you drill down to the Triggered Rules page, you will see the following details:

The Incident that is created will have the following title, and its body will contain similar information as below:

Monitor Solution Critical Alert - HTTP 200 OK Custom Rule - IIS failed to return a HTTP 200 OK message

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.