5.3 Upgrading Jobs for Default-named Knowledge Scripts Using AMAdmin_UpgradeJobs

The AMAdmin_UpgradeJobs Knowledge Script upgrades all child jobs for one or more parent jobs. You can select the parent jobs you want to upgrade based on the following criteria:

  • Knowledge Script—Upgrades all ad hoc jobs started by the specified Knowledge Script.

  • Knowledge Script Category—Upgrades all ad hoc jobs started by the specified Knowledge Script category.

  • Parent Job Identifier—Upgrades all ad hoc child jobs that belong to the specified Parent Job ID.

  • Monitoring Policy—Upgrades all policy-based jobs started by the specified Knowledge Script Group. If you are using a Knowledge Script Group in one or more monitoring policies, AMAdmin_UpgradeJobs upgrades jobs in all of the affected monitoring policies. This option does not upgrade ad hoc jobs started by a Knowledge Script Group.

The Windows user account for the agent services on the computer where you run this Knowledge Script must belong to the AppManager Administrator role. To see a list of valid AppManager administrators, in AppManager Security Manager expand AppManager Roles and click Administrator.

For more information about the AMAdmin_UpgradeJobs Knowledge Script, see the AppManager Knowledge Script Reference Guide, available on the AppManager Documentation page.

5.3.1 Performing an Instant-check Query Before Upgrading Jobs

Before you upgrade jobs using the AMAdmin_UpgradeJobs Knowledge Script, perform an instant-check query to identify jobs that have not been upgraded. The instant-check query identifies jobs by AppManager version and displays both Microsoft Windows and UNIX jobs. The query also identifies the agent version for each job.

You can perform the following instant-check queries:

  • Out-of-date parent jobs—Identifies parent jobs associated with a Knowledge Script that is not the latest version.

  • Up-to-date parent jobs—Identifies parent jobs using the latest version of a Knowledge Script.

  • Old parent jobs with no upgrade—Identifies jobs associated with an old Knowledge Script for which there is no new version. If the query returns any parent job IDs, the associated Knowledge Script has either been discontinued, or is a Knowledge Script you created or customized under a new name without creating a new version in the QDB. If the query returns no parent job IDs, no parent jobs are using out-of-date Knowledge Scripts.

  • Agent build IDs—Lists the agent build number on each computer. The query can help you identify agents to upgrade.

  • Monitoring-policy jobs—Identifies all jobs that are part of a monitoring policy. The query lists the jobs according to the view or server group associated with the monitoring policy and then sorts them by Knowledge Script Group.

    You cannot upgrade backlevel UNIX jobs that are policy-based. After you upgrade the backlevel UNIX agent to the latest version, remove the existing backlevel policy-based jobs and create new policy-based jobs.

5.3.2 Identifying Knowledge Scripts with New Parameters

Before you upgrade jobs, use the Generate report option to identify Knowledge Scripts with new parameters. The report provides detailed information about the changes to the Knowledge Script, including a list of new or changed parameters and the default values for those parameters.

Each time you run the AMAdmin_UpgradeJobs Knowledge Script, regardless of whether you choose to upgrade jobs or only generate the report, AppManager reports job upgrade information and saves the report in the \NetIQ\Temp\NetIQ_debug\Computer_Name\jobupgrade folder. For more information about viewing the reports, see Section 5.5, Verifying That a Job Has Been Upgraded.

5.3.3 Viewing Sample Job Upgrade Reports

Each time you run an AMAdmin_UpgradeJobs Knowledge Script job, the Knowledge Script creates the following reports in the \NetIQ\Temp\NetIQ_Debug\computer_name\jobupgrade folder:

  • Upgradejob_id.txt, where id is the AM_AdminUpgradeJobs job ID

    This report lists the jobs that are eligible for upgrade.

  • Upgradejob_id.rpt, where id is the AM_AdminUpgradeJobs job ID

    This report provides detailed information about the changes that will be applied to jobs that are eligible for upgrade.

  • Upgradejob_id.log, where id is the UpgradeJobs job ID

    This report lists the job IDs of the jobs eligible for upgrade and references the corresponding .rpt and .log files for more information.

If the child of a specified parent job is running on an agent that has not been upgraded to the current version and you specified the Restricted upgrade option, the UpgradeJob_id.txt file displays information similar to the following example:

Connected to SQL Server : RACKR14 repository QDB.
Time stamp: 03/03/11 14:20:47
  [Child Job] [Parent Job] [Build ID]  [Computer\KS]
2 5.0.1 agent(s) found.
2 6.0.2 agent(s) found.
Parent job 436 is skipped because under restricted mode, there cannot be any non-8.0 agents.
Upgrade is finished.
Please check upgradejob_1343.rpt and upgradejob_1343.log located in
D:\NetIQ\Temp\NetIQ_Debug\RACKR14\jobupgrade.
Time stamp: 03/03/11 14:20:47

If the child of a specified parent job can be upgraded with parameter changes, the UpgradeJob_id.rpt file displays information similar to the following example:

Connected to SQL Server : RACKR14 repository QDB.
Time stamp: 03/03/11 15:14:30
***********************************************************
Parent job 54 can be upgraded under force mode.
2 5.0.1 agent(s) found.
2 6.0.2 agent(s) found.
1)
Child job ID = 55
Parent job ID = 54
KS name = NT_CpuLoaded
Machine name = RACKN08
Version = 5.0
Job 55 can be upgraded.
The following parameters in the existing job are not found in the new version of the KS:
1) Event? (y/n)
Existing value is y.
2) Collect Data? (y/n)
Existing value is y.
3) Overall Load? (y/n)
Existing value is y.
4) Cpu Threshold > 
Existing value is 0
. . .
14) Threshold - Processor queue length
Default value is 0
Check for OldParameter tag
1) Create event if total system CPU is high?
Default value is y
OldParameter tag value = ?DO_EVENT="y" ((AND)) DO_OVERALL="y":"y":"n".
New StringValue = "y"
. . .
4) Severity - Individual CPU
Default value is 15
OldParameter tag value = ?DO_EVENT="y" ((AND)) DO_OVERALL="n":Severity:$default$.
No matching value, will keep original.
. . .
10) Threshold - Individual CPU
Default value is 98
OldParameter tag value = ?DO_OVERALL="n":TH_UTIL:$default$.
No matching value, will keep original.

If the child of a specified parent job cannot be upgraded because the agent on which it is running is from a version no longer supported (such as 6.0), the entry is similar to the following example:

Parent job 1536 cannot be upgraded under restricted mode. 29 6.0 agents are found. Please upgrade these agents and restart the upgrade process.

In this case, upgrade the agent or use the Force option to upgrade the jobs on the older agent.