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.
Click to view.
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.
cmd.exe /C "cscript.exe C:\Inetpub\AdminScripts\adsutils.vbs START_SERVER W3SVC/1"
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: