5.10 Customizing Knowledge Scripts

You can change the default settings of a Knowledge Script or create a new Knowledge Script with the settings you want. For more information, see Section 5.10.4, Copying a Knowledge Script.

You can propagate changes you make to the schedule, monitoring values, actions, and advanced options to running jobs. For more information, see the following sections.

5.10.1 Changing Default Knowledge Script Properties

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.

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.

Depending on your business needs, you might prefer to check the Knowledge Script out of the primary QDB to make your changes. Checking out the Knowledge Script updates the version number of the Knowledge Script and updates its change history.

After changing the default threshold values or schedule for a Knowledge Script, you should replicate the updated Knowledge Script to the non-primary QDBs that Control Center manages. For more information, see Section 5.10.3, Replicating a Knowledge Script.

For information about propagating the Knowledge Script properties to existing jobs, see Section 5.10.2, Propagating a Knowledge Script to Ad Hoc Jobs.

To change Knowledge Script properties:

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

  2. In the view pane, double-click the Knowledge Script you want to change.

  3. In the Properties window, click a tab and make your changes.

  4. Click OK.

    AppManager writes the changes to the primary QDB. To apply the changes to other QDBs that Control Center manages, replicate the Knowledge Script. For more information, see Section 5.10.3, Replicating a Knowledge Script.

5.10.2 Propagating a Knowledge Script to Ad Hoc Jobs

You can update all ad hoc jobs or reports started by a particular Knowledge Script by propagating:

  • The actual script logic.

  • The Knowledge Script properties, including changes to schedule, monitoring values, override values, actions, and advanced options.

AppManager stops and restarts all corresponding jobs with the Knowledge Script properties. If you are managing more than one QDB with Control Center, the propagation applies to all corresponding jobs across all QDBs.

If you configured an override value for a job parameter, the Knowledge Script propagation replaces the override value with the override value specified in the Knowledge Script, if one was specified. If an override value is not specified in the Knowledge Script, AppManager propagates the default parameter value.

Before you propagate the Knowledge Script properties of a report, specify a value for all of the required parameters. For example, make sure you update a report script to include parameter values that are not displayed on the Values tab of the Knowledge Script Properties window.

For more information about propagating properties to monitoring jobs started by a Knowledge Script Group, see Section 7.3.1, Propagating a Knowledge Script Group Member to Ad Hoc Jobs.

To propagate a Knowledge Script to an ad hoc job:

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

  2. In the view pane, click the Knowledge Script you want and then in the Tasks pane click Propagate > Knowledge Script To Ad Hoc Jobs.

  3. In the Knowledge Script Propagation window, select the components of the Knowledge Script that you want to propagate to associated ad hoc jobs:

    Select...

    To propagate...

    Propagate knowledge script code to ad hoc jobs

    The logic of the Knowledge Script.

    Propagate knowledge script properties to ad hoc jobs

    The Knowledge Script properties, including schedule, monitoring values, actions, and advanced options.

  4. When you finish, click OK.

5.10.3 Replicating a Knowledge Script

You can replicate a Knowledge Script from the primary QDB, including its schedule, monitoring values, actions, and advanced options, to all of the QDBs that Control Center manages.

Note that when you start a job, Control Center uses the Knowledge Script in the primary QDB to create the job. However, the Knowledge Script itself is not automatically replicated.

Replicating a Knowledge Script from the primary QDB to all of the QDBs that Control Center manages enables you to maintain consistency between the Knowledge Scripts in the primary QDB and the other QDBs that Control Center manages. This consistency is particularly useful when you want to change the primary QDB to another QDB.

To replicate a Knowledge Script:

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

  2. In the view pane, click the Knowledge Script you want to replicate and then click Replicate Knowledge Script.

  3. To acknowledge the confirmation message, click Yes.

You can also configure the Control Center console to automatically replicate any changes to Knowledge Scripts in the primary QDB to all non-primary QDBs. For more information, see Section 3.2.4, Knowledge Scripts Options.

5.10.4 Copying a Knowledge Script

You can copy a Knowledge Script and then change its properties to create a new, customized Knowledge Script. The new Knowledge Script name 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 Section 7.1.2, How Knowledge Script Groups Work.

To copy a Knowledge Script:

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

  2. In the view pane, select the Knowledge Script that you want to copy.

  3. In the Tasks pane, click Copy Knowledge Script.

  4. Enter a new name and description for the Knowledge Script. 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_

  5. Click OK.

    The new Knowledge Script is automatically checked into the primary QDB.

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

  7. In the Properties window, make the changes you want on the Schedule, Values, Actions, or Advanced tabs.

  8. Click OK to save the changes to the QDB.

5.10.5 Checking a Knowledge Script into the Primary QDB

To run a new or modified Knowledge Script, first check the Knowledge Script into the primary QDB.

NetIQ Corporation recommends limiting the length of a Knowledge Script name to 120 characters or less. 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 Section 7.1.2, How Knowledge Script Groups Work.

To check a Knowledge Script into the primary QDB:

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

  2. In the Tasks pane, click Check In > Knowledge Script.

  3. Browse to the Knowledge Script you want, and click Open.

  4. Select whether you want to merge the Knowledge Script with the current version or overwrite the current version with the Knowledge Script you are checking in.

NOTE:If you overwrite the current Knowledge Script, be sure you increment the version number of the Knowledge Script by updating the KSVerID element in the QML. If you checked the Knowledge Script out previously, then AppManager increments the version number automatically. If you are checking the Knowledge Script in without a prior check-out, manually update KSVerID with an incremented version number. If you do not increment the version number, AppManager will not automatically replicate the Knowledge Script to any non-primary QDBs and the UpgradeJobs Knowledge Script will not recognize the Knowledge Script as having been updated.

To check a Knowledge Script out of the primary QDB and copy it to your local computer, select the Knowledge Script you want in the view pane and in the Tasks pane click Check Out > Knowledge Script.

5.10.6 Propagating Knowledge Scripts to Renamed Knowledge Scripts and Renamed Knowledge Script Group Members

After you check a new or modified Knowledge Script into the primary QDB, you can propagate the Knowledge Script to Knowledge Scripts you created by copying and renaming default Knowledge Scripts. You can propagate the new or modified Knowledge Script to:

  • Renamed Knowledge Scripts and ad hoc jobs that were started from those renamed Knowledge Scripts.

  • Renamed Knowledge Scripts within Knowledge Script Groups.

  • Only renamed Knowledge Scripts.

You can propagate one or both of the following Knowledge Script elements:

  • The actual script logic

    If you select to propagate only the script logic, the propagation retains any changes you made to the default values for job parameters. If the Knowledge Script includes a new parameter, the propagation adds the parameter. If a parameter has been removed from the Knowledge Script, the propagation deletes the parameter.

  • The Knowledge Script properties, including changes to schedule, monitoring values, override values, actions, and advanced options

    If you changed the default values for job parameters and you select to propagate Knowledge Script properties, the propagation replaces your customizations with the default parameter values specified in the Knowledge Script.

If you configured an override value for a job parameter, the propagation replaces the override value with the override value specified in the Knowledge Script, if one was specified. If an override value is not specified in the Knowledge Script, AppManager propagates the default parameter value.

You cannot undo propagation of new code and properties to renamed Knowledge Scripts. If you update the jobs associated with renamed Knowledge Scripts, AppManager stops all corresponding jobs and restarts them with the changes. If you are managing more than one QDB with Control Center, the propagation applies to all corresponding jobs across all QDBs.

To propagate a Knowledge Script to renamed Knowledge Scripts or Knowledge Script Group members:

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

  2. In the view pane, click the default Knowledge Script you want and then in the Tasks pane click Propagate > Knowledge Script To Renamed Knowledge Scripts.

  3. Use the Knowledge Script Propagation wizard to select the renamed Knowledge Scripts you want to update, where to propagate the Knowledge Script changes, and the Knowledge Script elements to propagate. For more information about completing these actions, see the Help in the wizard.