Adding a parameter to an application

This section describes how to add a parameter with a command script to the PATROL environment using the PATROL Developer Console for Windows and UNIX. Adding a parameter and adding a command script are addressed in one step because you must supply a command script for standard and collector parameters before they can be save as part of the KM. 

Parameter general properties

Parameter general properties options

Property

Default

Description

Name

None

The internal name that PATROL product uses to manage the parameter. The name must be unique and contain no spaces. You cannot change a parameter's name; to rename a parameter, you must delete it and recreate it.

Active

Yes

An indicator that determines whether the parameter is executed by the PATROL Agent. In some situations, such as a resource-intensive parameter, you may wish to deactivate the parameter so the user can evaluate when to activate it.

Type

Standard

In the type list, click Standard, Consumer, or Collector.

Style

No output

The display style for the parameter. Choose the appropriate style from the list box.

Units

None

For parameters with graphical display styles only. The units in which the parameter data is expressed.

History Level

Inherited

To inherit the historical data retention period set higher in the PATROL object hierarchy, accept Inherited. For PATROL KMs, accept Inherited. Setting History Level is a user configuration issue, not a development decision. To set the historical data retention period for this parameter only, click Local. Set the retention period in the associated Number of History Days spin boxes.

Number of History Days

0 (zero)

See History Level.

Parameter command properties

The following table describes the command properties of a parameter. 

 Parameter command properties 

Property

Default

Description

Computer Class

ALL_COMPUTERS

The computer class against which the parameter is to be executed. Choose ALL_COMPUTERS to execute the parameter consistently on every computer.

Command Type

OS

Select the language used to write the command script from the list of installed command types.

Command

None

The text editor window in which to type or copy the parameter commands in the selected Command Type.

Save in KM

Yes

Click Save in KM to save the parameter command as part of the PATROL KM file.

Save to File

No

Click Save to File to save the parameter command in a separate file in the PATROL PSL directory. Selecting this option allows the file to be referenced by other parameters, commands, etc. However, this technique is difficult to manage and many PATROL KM problems can result from selecting this technique.

Adding a parameter on Windows

In this task, you will add a parameter with a command script to your PATROL environment and set the General tab properties of the new parameter.

To  add a new parameter on Windows

  1. In the KM tab of the PATROL Tree View, locate the Global\Parameters folder for the application class for which you wish to add a new parameter.
  2. Click the Parameters folder with the right mouse button to access the Parameters shortcut menu.
  3. Choose the New option from the shortcut menu. The New Parameter Properties Sheet appears, as shown in the following figure for you to name the new parameter and define its properties.
  4. Define the General properties of the new parameter on the Parameter Properties dialog box General tab. 

     Parameter Properties dialog box, General tab 


    After you specify the properties on the General tab, you must select the Command tab and enter the command text for the parameter, unless the new parameter is a consumer because consumer parameters do not have command text.

To  add a parameter command script on Windows

  1. Click the Command tab on the Parameter Properties dialog box for the appropriate parameter. The Command properties for the selected parameter appear as shown in the following figure. 

    Parameter Properties dialog box, Command tab

  2. Select the appropriate options for the Computer Class and the Command Type properties that appear on the Command tab. .
  3. Type the commands to gather parameter data in the Command text box.
  4. Click Apply to save the changes to the PATROL KM.

Adding a parameter on UNIX

In this task, you will add a parameter with a command script to your PATROL environment and set the general properties of the new parameter

To add a new parameter

  1. Choose Attributes > Parameters from the menu bar of the application class to which you wish to add a new parameter
    The List of Parameters window for the selected application class appears similar to the window shown in the following figure. The List of Parameters window shows all of the parameters defined for the selected computer or application. 

     List of Parameters window 

  2. Choose Edit > Add from the List of Parameters window (the following figure) menu bar.
    A Parameter Definition dialog box appears, similar to the one shown in the following figure.
  3. On the Parameter Definition dialog box, specify the General properties for the parameter.
     Parameter Definition dialog box, General 

To  add a parameter command script on UNIX

  1. On the Parameter Definition dialog box as shown in the following figure, specify the Command properties for the parameter. 

    Parameter Definition dialog box, Command

    For collector and standard parameters, choose the appropriate options for the Computer Class and the Command Type properties. 
    For collector and standard parameter commands, type the commands to gather parameter data in the Command text box or click the Command button to access the Command Text Editor window as shown in the following figure. 

    Command text editor window


    This window will have different menu options and functions depending on the type of command you are entering. Click Help for more information about the window.
  2. Choose one of the following options to create the command:
    • To manually enter the command procedure, type the command string for the command in the window's editing area.
    • To load an existing file that contains a procedure, choose File > Load from the Command window menu bar. 

      You can load previously saved scripts into existing commands and save the combined text as a new file. The saved command text is available for new commands.
  3. Save yo ur command text by selecting File > Save from the Command window menu bar. If you are not using PSL for your command type, the Editor exit dialog box appears, as shown in the following figure, prompting you to save the command text in either the KM or a separate file.  If you are using PSL for your command type, the command will be compiled at this time, and the PSL Compiler message displays, as shown in the following figure. 

    PSL compiler message


    When the PSL compiler is finished, the PSL compiler displays one of the following compilation messages:
    • Success indicates that you PSL command had no syntax errors.
    • Warning indicates that your PSL command had no errors that would prevent it from executing, but there is a potential problem.
    • Failure indicates that the PSL script had errors that would prevent it from executing
      The following figure shows a successful PSL compiler message. 

      PSL Compiler Success message


      When you click OK on the PSL Compiler Success message or save a non PSL command, the Editor exit dialog box appears, as shown in the following figure, prompting you to save the command text in either the KM or a separate file. 

      Editor Exit dialog box

  4. Save the command text in either the KM or a separate file by clicking the appropriate choice.
  5. Apply the changes and save the PATROL KM.
  6. Click OK to save the parameter definition. If you are adding a collector parameter or a standard parameter, you must define a command for the parameter before you can save it. The parameter is added to the associated application class.

KM output-application parameter

The following figure shows sample output created by the PATROL Developer Console when you add discovery to an application class. 

KM output-application class standard parameter 

Was this page helpful? Yes No Submitting... Thank you

Comments