Configuring the PSL Recovery Action


The next step is to assign the PSL recovery action to the arsCommand rule so that when the ArchFreeSpace parameter enters a WARN or ALARM state, the PSL recovery action gets the account and encrypted password and uses it to run the script located in /home/oracle/scripts/arch_backup.ksh.

To assign the PSL recovery action to the arsCommand rule

  1. From the PATROL console, access the agent computer KM menu commands, as described in Accessing KM Commands and InfoBoxes, and choose the command Event Management > Alert Settings > Local Alert Settings > Recovery Action Commands > Set For Parameters.
  2. Select the application class ORACLE_AVAILABILITY, instance Test, and parameter ArchFreeSpace.
  3. From the SET EVENT MANAGEMENT VARIABLE: arsCommand dialog box, enter the following PSL code:

     {{oracle_os = nthlinef(pconfig("GET", "/MYCOMPANY/}}
    ORACLE {{/OSlogin"
    ), 2, ""); usern = nthargf(oracle_os, 1, " ", ""); passwd = nthargf(oracle_os, 2, " ", ""); results = execute("OS", "/home/oracle/scripts/arch_backup.ksh", "", usern, passwd); print("Results of script follows:\n", results, "\nend..."); ;}}
    Warning

    Note

    Before entering your own PSL recovery action code, you must test the code for errors using the testing functionality in the PATROL console.

    This PSL recovery action is stored in the following configuration variable:
    /AS/EVENTSPRING/ORACLE_AVAILABILITY/test/ArchFreeSpace/arsCommand

  4. To save your changes, click Accept.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC PATROL for Event Management 2.9.00