5.10 Customizing Knowledge Scripts

As you gain experience monitoring your environment, you might find that you want to change the default properties for selected Knowledge Scripts rather than changing the parameter values for individual jobs. You can copy a base Knowledge Script to create a derived script with the settings you want. For more information, see Copying a Knowledge Script.

Before changing the default threshold values or schedule for a Knowledge Script, you might want to:

  • Run any Knowledge Scripts that collect data related to the threshold you want to change to determine a typical value for your environment.

  • Run the Knowledge Script you want to change with the default values to evaluate whether you are seeing too many or too few events.

  • Run one or more independent jobs with the values you want to use to test that the results are what you expect before changing the defaults.

5.10.1 Copying a Knowledge Script

You can copy a base Knowledge Script to create a derived Knowledge Script and then change its properties to create a new, customized Knowledge Script. The base script and the derived script share logic, but the derived script has its own settings. For example, a base Knowledge Script might have a default threshold of 10 for a certain parameter while the derived Knowledge Script has a default threshold of 20. The two Knowledge Scripts share the script logic, but the settings are different.

Because a base Knowledge Script and a derived Knowledge Script share logic, when the logic for a base Knowledge Script changes, AppManager can automatically update the logic for derived Knowledge Scripts without updating the settings. This option (Automatically update Derived KS properties for checked in Base KSs) is enabled by default for new installations. For more information about enabling or disabling the option, see Knowledge Scripts Options.

If the automatic update option is not enabled, you must manually update the logic for derived Knowledge Scripts when the base script changes. For information about manually updating derived scripts, see Manually Propagating a base Knowledge Script to Derived Knowledge Scripts and Ad Hoc Jobs.

If you create a copy of a derived Knowledge Script, the additional copy is still a derived script of the original base script. For example, if you copy NT_CpuLoaded to My_CpuLoaded and then copy My_CpuLoaded to Your_CpuLoaded, NT_CpuLoaded is the base script for Your_CpuLoaded. Updating NT_CpuLoaded will update both My_CpuLoaded and Your_CpuLoaded.

Derived Knowledge Script names cannot exceed 125 characters. NetIQ Corporation recommends limiting the length of a Knowledge Script name to 120 characters. Limiting the length to 120 characters prevents AppManager from truncating the Knowledge Script job name when running the Knowledge Script from a monitoring policy or as an ad hoc job started by a Knowledge Script Group. For more information, see How Knowledge Script Groups Work.

To copy a base Knowledge Script:

  1. In the Enterprise Layout view of the Navigation pane, click the appropriate Knowledge Scripts view.

  2. In the view pane, right-click the Knowledge Script that you want to copy and select Copy Knowledge Script.

  3. Enter a new name and description for the Knowledge Script, and then click OK.

    By default, AppManager appends the phrase “CopyOf” to the Knowledge Script name to ensure that a new script is created.

    To...

    Do this...

    Display the new Knowledge Script in the same category as the original script

    Do not change the prefix that appears before the underscore.

    Create a new category for your customized Knowledge Scripts

    Type a new name before the underscore. For example, MySite_.

    The new Knowledge Script is automatically checked in to the primary QDB.

  4. In the view pane, double-click the new Knowledge Script you created.

  5. In the Properties window, make the changes you want on the Schedule, Values, Actions, or Advanced tabs, and then click OK to save the changes to the QDB.

    Jobs that you create from the derived Knowledge Script will use the properties that you specified.

5.10.2 Manually Propagating a base Knowledge Script to Derived Knowledge Scripts and Ad Hoc Jobs

You can use the Knowledge Script Propagation wizard to view all of the derived Knowledge Scripts and ad hoc jobs that are pending propagation and select specific scripts and ad hoc jobs to process or update all scripts and ad hoc jobs. You can also right-click a base Knowledge Script in a Knowledge Scripts view and use the menu options provided. When you use the right-click option to propagate to ad hoc jobs, AppManager updates all of the associated ad hoc jobs in all QDBs. If you want to propagate only to ad hoc jobs running in specific QDBs, use the wizard. When you use the right-click option to propagate to derived Knowledge Scripts, you can choose the scripts to update.

NOTE:If the Automatically update Derived KS properties for checked in Base KSs option is enabled, the right-click option to propagate to derived Knowledge Scripts is not available because the propagation occurs automatically.

When you propagate a base script to derived scripts or ad hoc jobs, AppManager merges any additions or deletions in the base script with the target scripts or jobs but retains the existing values, including override values.

To manually propagate a base Knowledge Script to derived Knowledge Scripts and ad hoc jobs using the wizard:

  1. On the Global Tasks tab, click Launch KS Propagation Wizard.

  2. (Conditional) To propagate a base Knowledge Script to derived Knowledge Scripts, on the Propagation to Derived Knowledge Scripts tab, select the specific base scripts that you want to propagate, or click Select All to propagate all pending changes.

  3. (Conditional) To propagate a base Knowledge Script to ad hoc jobs, on the Propagation to Ad Hoc Jobs tab, expand the script that you want to propagate to view the QDBs where ad hoc jobs are running.

  4. Select the QDBs where you want to update ad hoc jobs, or click Select All to propagate all pending changes.

  5. When you are done making your selections, click Propagate, and then confirm that you are ready to propagate.

    If you selected to propagate to derived Knowledge Scripts, AppManager updates all direct copies of the script, all Knowledge Script Group members that are based on the script, and all monitoring policy jobs for the script.

    If you selected to propagate to ad hoc jobs, AppManager updates the jobs in the QDBs that you selected.

To manually propagate a base Knowledge Script to derived Knowledge Scripts and ad hoc jobs using the right-click option:

  1. In the Enterprise Layout view of the Navigation pane, click the appropriate Knowledge Scripts view.

  2. In the view pane, right-click the Knowledge Script you want, select Propagate, and, depending on where you want to propagate the script, select To Ad Hoc Jobs or To Derived Knowledge Scripts, and then click OK.

    (Conditional) If you selected to propagate to derived Knowledge Scripts, select the specific scripts that you want to update or click Select All to update all available scripts, and then confirm that you are ready to propagate.

    If you selected to propagate to ad hoc jobs, AppManager updates all associated ad hoc jobs in all QDBs.

    If you selected to propagate to derived Knowledge Scripts, AppManager updates all direct copies that you selected, all Knowledge Script Group members that you selected, and all monitoring policy jobs for the Knowledge Script Group members that you selected.