System WMI Rules

WMI Rules permit extremely flexible monitoring, since it is done through a custom VBScript. What makes WMI Rules so powerful and useful is their obvious ability to run any WMI script.

WMI Rules can be used in the following situations:

  • The monitored object is only exposed through a WMI interface. This is becoming more common as Microsoft pushes WMI technology.
  • The monitoring logic needed is very complicated, making use of existing Rule types difficult.
  • A third-party product exposes its programming interface through ActiveX objects.

To tightly integrate with WMI technology, Argent provides a set of Properties and Methods by extending the VBScript naming space. They are conveniently available through the drop down menu by clicking the specific buttons.

Properties

Use this drop-down to select the name of the server that the Rule is run against.

In place of the machine name, the property TargetServer can be used. When the Rule runs, TargetServer is replaced with the machine name. This allows the same Rule to be used against multiple machines.

AGClusterName and AGClusterObject can be used for cluster monitoring through WMI.

Methods

Use this drop-down to select from the available options.

IsCancelled

This method returns TRUE if execution of the Rule is cancelled. This method makes the Rule more responsive, especially when the Rule runs in some sort of loop.

Syntax:

if IsCancelled( wait_ms ) then … else … end if

The parameter wait_ms is the sleep time in milliseconds. The method returns TRUE immediately if the cancel event is detected, or returns FALSE in wait_ms milliseconds.

DecryptPassword

This method allows for an encrypted password to be saved within the WMI Rule script. This allows for greater security. The Argent WMI Monitor will prompt the user for the password and automatically create the encrypted syntax.

Syntax:

DecryptPassword(“{\177\151\138\359\139\132\143}”)

FireAlert

This method fires an Event in the Argent Console. It causes the Rule to be broken and an alert to be fired.

Syntax:

FireAlert message, comparison_string

The parameter message is a string type, and is the event detail.

comparison_string is used to uniquely identify the event. It affects the calculation of event occurrence.

DoMessage

This method generates a network message. The Messenger service must be running in order to get the message generated.

Syntax:

DoMessage message

The parameter message is string type. It is the actual message text shown on the desktop.

WriteStatus message

This method writes text into the service log.

Syntax:

WriteStatus message

The parameter message is a string type. It is the actual message written to the service log.

SavePredictor

This method saves the Argent Predictor data into the database, allowing for later trend analysis.

Syntax:

SavePredictor counter, instance, metric

The parameter counter is a string type. It is the performance data counter name.

instance is a string type. It is the performance data instance name.

metric is a numeric type. It is the performance data itself.

SavePredictorEx

This method saves the Argent Predictor data into the database SavePredictorEx is used when the target performance object has multiple instances.

Syntax:

SavePredictorEx object, counter, instance, metric

The parameter object is a string type. It is the performance data object name.

counter is a string type. It is the performance data counter name.

instance is a string type. It is the performance data instance name.

metric is a numeric type. It is the performance data itself.