Setting up PSL discovery

This section describes how to set up PSL Discovery for an application class using the PATROL Developer Console for Windows and UNIX. 

Recommended discovery script tasks

The following table describes discovery script tasks. You should provide logic in your discovery script to perform these tasks.

Recommended discovery script tasks

Discovery action

Algorithm

Define the environment for the application

Define the environment for each application instance. Then, set all path and system environment variables for the parameters and menus to be executed.

Create icons for each detected application instance.

Icons should be created for each application instance monitored. Discovery references the files created during setup and selective discovery to determine which application instances to monitor. When initially created, the icon(s) for an application instance should be in NEW state. The application instance icon will not appear until the state is set.

Determine and set the state of each created application instance.

In general, the conditions under which discovery directly sets the state of an application instance should be limited to:

  • If all related files and processes are available, set object state to OK.
  • If a partial set of files and processes are available, set object state to WARN.

If none of the expected application files and processes is available, do the following:

  • If the monitored application was detected as down on initial discovery (instance in NEW state), set object state to OFFLINE.
  • If the monitored application was not down on initial discovery, set object state to ALARM for one application check cycle, then set object state to OFFLINE.

See Application instance states for details about the states defined by the PATROL product.

Setting up PSL discovery on Windows

In this task, you will set up PSL discovery for an application class.Before setting up PSL discovery, you should have created the application class definition and set its general properties.

To set the discovery property

  1. Choose the Properties option from the application menu for the application class or object class that you wish to the PATROL Agent to detect.
    The Application Properties dialog box for the selected application class appears with the General tab options displayed as shown in Application Properties dialog box, General tab.
  2. Click PSL to set the Discovery type to PSL. The Pre-Discovery and Discovery tabs appear on the Application Properties dialog box as shown in Application Properties dialog box, General tab

To create a PSL discovery script

  1. Click the Discovery tab to access a text box in which to type the script to perform discovery as shown in the following figure. 

     Application Properties dialog box, Discovery tab 
  2. Edit the script to provide the logic to control the discovery process. See Recommended discovery script tasks for suggested discovery tasks.
  3. Click*Save to File* to save the PSL pre-discovery script in the PATROL Global PSL directory %HOMEDRIVE%%HOMEPATH%\patrol\psl.
    You will be prompted for a PSL file name.
    In developing PATROL KMs, you can save PSL scripts to a separate file or to the PATROL KM file. Saving your PSL to a separate file allows you to reuse the PSL in other KMs.
  4. Click Apply to apply the changes and click OK to close the dialog box.
  5. Choose File > Save KM from the PATROL Developer Console main menu to save the PATROL KM.
    The PATROL Console for Windows saves the local KM information in the local PATROL KM directory. By default, the local PATROL KM directory is the subdirectory of the local PATROL directory named %HOMEDRIVE%%HOMEPATH%\patrol\knowledge
    You can use the PATROL Environmental Probe utility to view the settings of these environment variables on your machine.

Setting up PSL discovery on UNIX

In this task, you will set up PSL discovery for an application class. Before setting up PSL discovery, you should have created the application class definition and set its general properties.

To set the discovery type

  1. Access the Application Definition dialog box for the appropriate application class. The Discovery options for the selected application class appear as in 

    Application Definition dialog box, PSL discovery 
  2. Click PSL to set the Discovery Rules type to PSL discovery.
    The PSL Pre-Discovery and PSL Discovery buttons appear on the Application Properties dialog box as in Application Definition dialog box, PSL discovery.

To create a PSL discovery script

  1. Click the PSL Discovery button to access a text box in which to type the script to perform discovery.
    The PSL Discovery window appears for you to create the discovery script as shown in the following figure. 

     PSL Discovery Edit window 

  2. Edit the script to provide the logic to control the discovery process. See Recommended discovery script tasks for suggested discovery tasks.
  3. Choose File > Save from the window menu bar to save the PSL discovery script.
    If you are saving the script for the first time, the Editor dialog box, similar to the one shown in the following figure, appears prompting you to choose where you want the file saved. 

     Editor Dialog box 

  4. Click Separate File to save the PSL discovery script in the PATROL Global PSL directory $HOME/patrol/lib/psl. You will be prompted for a PSL file name.
    In developing PATROL KMs, you can save PSL scripts to a separate file or to the PATROL KM file. Saving your PSL to a separate file allows you to reuse the PSL in other KMs.
  5. Choose File > Exit from the PSL Editor menu to exit the editor.
  6. Click Apply to apply the changes to the Application Definition dialog box; then, click OK to close the dialog box.
  7. Choose File > Save KM from the List of Applications menu to save the PATROL KM. The PATROL Console saves the local PATROL KM information in the local KM directory,$HOME/patrol/knowledge and the PSL files in $HOME/patrol/lib/psl.

KM output-application discovery

The following figure shows output created by the PATROL Developer Console when you add discovery to an application class using an external PSL script file. Using external script files allows you to reuse your scripts in other KMs. 

 KM output-application class PSL discovery 

To set up PSL discovery for an application class, see Creating parameters.

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

Comments