HP Operations Manager for Windows

Editing parameters in the Threshold Policy Type editor


HPOM for Windows can use VBScript or Perl scripts in measurement threshold policies to do more complicated calculations to evaluate a threshold or to add additional functionality. By configuring parameters in scripts that can easily be changed later, you can customize the variables in the script without the need to change the script itself. The script parameters are changed on the Script Parameters tab and the editor changes the script.

Parameter Definitions

Parameters are defined during policy development. The policy developer decides which script variables a customer can customize and that should be displayed on the Script Parameters tab. The parameters are defined in the script with fixed syntax. As shown in the following example, the character # (comment in Perl) is used to define a comment. For VBScript, you must use the ' character.

The parameter definition block has to be at the beginning of the first script of a policy. The parameter definition block starts with:

#PARAMETERS START

The parameter definition block ends with:

#PARAMETERS END

The script parameter definition block is changed when you change script parameters on the Script Parameters tab. Therefore, it should only contain script parameter definitions. All other comments or script code in the script parameter definition block will be overwritten. Each parameter is defined with at least the following information:

#PARAMETER <name> [STRING|INT|DOUBLE] DEFAULT <default value>
For example:

#PARAMETER CriticalThreshold INT DEFAULT 95

If the parameter is defined as STRING value, you must use " at the beginning and end of the value.

For example:

#PARAMETER CriticalThresholdMsg STRING DEFAULT "Critical Message"

The name, data type, and the default value of a script parameter definition are required.

When you save the script with the parameter definition, the editor parses the script parameter block and inserts the Perl or VBScript variables you have defined.

For example:

#PARAMETERS START
#PARAMETER CriticalThreshold INT DEFAULT 95
#PARAMETERS END

and saves the script. The editor creates the following script parameter block for a Perl script:

#PARAMETERS START
#PARAMETER CriticalThreshold INT DEFAULT 95
my $CriticalThreshold;
$CriticalThreshold = 95;
#PARAMETERS END

The VBScript is as follows:

'PARAMETERS START
'PARAMETER CriticalThreshold INT DEFAULT 95
DIM CriticalThreshold
CriticalThreshold = 95
'PARAMETERS END

In most cases, the complicated script policies contain only one script that contains all logic. But threshold policies can be much more complex, with multiple instance filter rules or threshold levels with threshold and reset scripts. The parameter definition block is evaluated only from the first script.

If the order of threshold levels or instance filter rules is changed or if a policy is changed to use instance filter rules, the editor moves an already existing script parameter block automatically to the correct script. However, it is possible to define that the script parameters are also stored as SESSION parameters, as explained in the help topic SESSION parameters.

 

500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@systemmanager.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.