Use Windows Script monitors

This component monitor runs a Windows script on the Orion server and then processes the script's exit code and text output. This monitor can return up to ten pairs — 10 statistic values and 10 optional messages. This is best used in conjunction with the Multiple Statistic Chart. To create this monitor, see Use Windows Script monitors.

A maximum of 10 output pairs can be returned. If you exceed the maximum allowed, remove the excess output pairs or they are ignored.

Statistic

The statistic for this component monitor is the value returned by the script.

Script Monitor Formatting

At least one message and statistic is required. The statistic must be a valid integer and be able to be converted to double, otherwise it is handled as Not as Number (NaN). There is no maximum length for the message; however, only alphanumeric characters and the underscore are allowed.

Field descriptions

Description

This field provides a default description of the monitor. You can override the default description by adding to or replacing the text, which will then be automatically saved. The variable to access this field is ${UserDescription}.

Component Type

This describes the type of monitor you are using.

Enable Component

This option determines whether or not the component is enabled. Disabling this component leaves it in the application as deactivated and does not influence application availability or status.

Credential for Monitoring

Select a Windows credential that is both a user who can log on to the Orion server, and has sufficient rights on the target node (which may be the Orion server itself, depending upon your application) to do whatever the script needs to do. For example, if the script does something with WMI, the credentials also need WMI rights on the target node.

Click a credential in the list, or use the <Inherit credential from node> option. If the credential you need is not in the credentials list, add it in the Credentials Library. See Understand the Credentials Library in SAM for details.

Script Arguments

This field is in the script editing window and allows you to specify arguments to pass to the script. You may include the variables ${IP}, ${USER}, and ${PASSWORD}, which are replaced respectively by the IP address of the target node, the credential user name, and the credential password.

Script Engine

This field allows you to specify the scripting language to be used. The default value is vbscript. Below is a list of scripting engines that the Windows Script Host supports:

Name File Extensions Availability

VBScript

.vbs

Installed by default

JScript

.js

Installed by default

PerlScript

.pls

Freeware

ooRexxScript

.rxs

Freeware

PythonScript

.pys

Freeware

TclScript

.tcls

Freeware

ActivePHPScript

.phps

Freeware

RubyScript

.rbs

Freeware

Object Rexx engine

Commercial

Delphi scripting engine

Commercial

Note the following details:

  • If the application monitor is set to Agentless, the VBscript runs on the main polling engine.
  • If the application monitor is set to Agent the script runs on the target node.
  • PowerShell uses WINRM that runs over TCP ports 5985 and 5986.
  • All Linux, Unix, and Nagios script monitors use SSH over TCP Port 22.

Script Body

Click Edit to open the script editing window where you can type or paste script text.

Status Roll-Up

This option allows you to choose how you would like the monitor to report the returned results based on the output provided by the script. With the ability to have multiple values returned, selecting how your scripts report back to you offers more flexibility. The default selection is “Show worst status."

User Notes

This field allows you to add notes for easy reference. You can access this field by using the variable, ${UserNotes}.

See also Create a Windows Script monitor.