However, if you define that the parameters are also stored as SESSION variables, you can use the SESSION variable to access the parameters in all scripts of the policy.
#PARAMETER <name> [STRING|INT|DOUBLE] DEFAULT <value> [SESSION ["<session name>"]]
If the SESSION keyword is used without a session name, the parameter name will be used also for the session variable. If the SESSION keyword is used, the created Perl code for the example above would be as shown:
#PARAMETERS START
#PARAMETER CriticalThreshold INT DEFAULT 95 SESSION
my $CriticalThreshold;
$CriticalThreshold = 95;
$Session->Value('CriticalThreshold', $CriticalThreshold);
#PARAMETERS END
The VBScript for the same situation is shown below:
'PARAMETERS START
'PARAMETER CriticalThreshold INT DEFAULT 95 SESSION
DIM CriticalThreshold
CriticalThreshold = 95
Session("CriticalThreshold") = CriticalThreshold
'PARAMETERS END
In other threshold level or instance rule scripts, it is now possible to use the SESSION variable to access the defined script parameter value. In a Perl script this would look like the following:
if ( $src->Value() > $Session->Value('CriticalThreshold') ) { $Rule->Status(TRUE); } The VBScript for the same situation is shown below: If Src.Value > Session.Value("CriticalThreshold") Then Rule.status = True End IfThe Parameter definition keywords help topic contains additional keywords.