Creating an InfoBox command

This section describes how to create an InfoBox command using the PATROL Developer Console for Windows and UNIX. The following topics are covered:

Example

InfoBox items that you create need to return short strings or numbers, not multiple lines of text.

InfoBox command properties

The following table describes the InfoBox command properties. 

 InfoBox command definition dialog options 

PropertyRequired/OptionalDefaultDescription
General properties
Command NameRequiredNone

The name that the PATROL product uses to manage the command and it is the title of the command as it appears on the 
pop-up menu. There are no restrictions on command name length; the menu expands to accommodate the name but the 
input field width is limited to 30 characters. Capitalizing the first letter of a command is standard and spaces are allowed.

CommandRequiredCommandInfobox commands always execute as commands.
AvailabilityRequiredALWAYS_AVAILABLE

Availability indicates when the command is enabled on the object's command menu. A command can be available:

  • ALWAYS_AVAILABLE - The menu command is always enabled, regardless of associated object's status.
  • AVAILABLE_ONLINE - The menu command is enabled only when the associated object is online.
  • AVAILABLE_OFFLINE - The menu command is enabled only when the associated object is offline.
Command properties
Computer ClassRequiredALL_COMPUTERS

The computer class against which the menu command is to be executed. ChooseALL_COMPUTERS to execute the same 
menu command syntax on every computer. If you need to define a different command syntax for each computer type, select 
the computer type and then define the appropriate syntax for that platform. In this way, you define the appropriate platform/command pair.

Command TypeRequiredOSChoose the language used to write the command script from the list of installed command types.
CommandRequiredNoneClick the Command button to access the Command Text Editor window to define the menu command procedure.
Save in KM or Save in FileRequiredSave in KM

Click Save in KM to save the parameter command as part of the PATROL KM file. ClickSave 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.

Security properties
Security TypeRequiredSECURITY_INHERIT

Choose the appropriate Security Type for the menu command:

  • SECURITY_INHERIT - The menu command is executed using the user name and password set for the computer or application at the 
    instance level, or, if not defined at that level, at the computer or application class level.
  • SECURITY_PROMPT - Before the menu command is executed, the user is prompted to supply a valid user name and password on whose authority, 
    the menu command is executed.
  • SECURITY_THIS - The menu command is executed under the authority of the user name and password typed in the associated fields. 
    Setting up command security is described in more detail in Specifying parameter security.
User NameConditionalNoneIf the Security TypeSECURITY_THIS is selected, type the user name of the account under whose authority the menu command is to be executed.
PasswordConditionalNoneIf the Security TypeSECURITY_THIS is selected, type the password of the account under whose authority the command is to be executed.
Environment properties
NameOptionalNoneThe name of the environment variable.
ValueOptionalNone

The value assigned to the environment variable. To change an existing environment variable, choose the variable from 
the Name/Value list and make the changes in the Name and Value text boxes

Adding an InfoBox command on Windows

In this task, you add an InfoBox command to an application class.

To add an InfoBox command on Windows

  1. In the KM tree, choose the application class you want to add the new InfoBox command to.
  2. Expand the Global folder view.
  3. Expand the Commands folder view.
  4. Right-click the Infobox Commands folder and then choose New from the shortcut menu.
    The Command Properties dialog box appears, as shown in the following figure. 

     Command Properties dialog box, General tab 

  5. Select the appropriate values for the Command Properties General tab. 
  6. Click the Command tab from the Command Properties dialog box as shown in the following figure. 

     Command Properties dialog box, Command tab 
  7. Select the appropriate options for the Computer Class and the Command Type properties that appear on the Command tab. 
  8. Type the commands the Command text box.
  9. Click Apply to save the changes to the PATROL KM.
  10. Click the Security tab on the Command Properties dialog box as shown in the following figure. 

     Command Properties dialog box, Security tab 
  11. Define appropriate options that appear on the Security tab.
  12. Click Apply to save the changes to the PATROL KM.
  13. Click the Environment tab on the Command Properties dialog box as shown in the following figure. 

     Command Properties dialog box, Environment tab 
  14. Select, add, or modify the appropriate options that appear on the Environment tab.
    • To add an environment variable, type it name and its value in the Name and Value text boxes.
    • To change an existing environment variable, choose the variable from the Name/Value list and make the changes in the Name and Value text boxes.
  15. Click Apply to save the changes to the PATROL KM.
  16. When InfoBox commands are created, they will appear in the KM Tree. The following figure shows the KM Tree after the ProcessID, KM Version, System Uptime, and Number of Users InfoBox commands were added.

 New InfoBox commands on the KM tree 

Adding an InfoBox command on UNIX

In this task, you add an InfoBox command to an application class.

To add an InfoBox command on UNIX

  1. Choose Attributes > Application Classes or Attributes > Computer Classes from the PATROL Console menu bar. The List of Application Classes or List of Computer Classes appears.
  2. Select the application class or computer class to which you wish to add an InfoBox item.
  3. Choose Attributes > Commands > InfoBox Commands from the associated menu bar. The List of InfoBox Items window for the selected class appears similar to the one shown in the following figure. 

    List of InfoBox Items window


    All InfoBox command definitions are maintained through this window. It lists all the commands currently available for modification in an InfoBox.
  4. Choose Edit > Add from the List of InfoBox Items menu bar to add a new InfoBox item. The InfoBox Item dialog box appears as shown in the following figure. 

    InfoBox Item dialog box

  5. Define the command by typing information in the appropriate entry fields and selecting and de-selecting check boxes.
  6. Click the Command button next to the text field in the Command Definition dialog box for the appropriate alarm or border action.
    The Command text edit window appears 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.
  7. Choose one of the following options to create the recovery action:
    • 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.
  8. S ave your 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

  9. Save the command text in either the KM or a separate file by clicking the appropriate choice. Click OK to save dialog box changes and exit the dialog box when finished. The List of InfoBox Items window appears. The new InfoBox item appears in the list and its command has been saved in the PATROL KM file.
  10. Choose File > Exit to exit the List of InfoBox Items window. Notice that the InfoBox has been updated to include the new item. Choose Update from the object's pop-up menu to execute the new InfoBox item immediately and test its result.

KM output-Infobox commands

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

 KM output-application class Infobox commands 

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

Comments