AuditJob - createLiveToLiveAuditJob
AuditJob - createLiveToLiveAuditJob
Description :
This command creates an Audit Job based on assets (that is, server objects) that you select. The job compares a live server to another live server.
You must provide an ID for the job group that will contain this Audit Job.
The templateKey argument provides a handle identifying the template describing the assets on which the audit is based. This command returns a handle to the newly created Audit Job. This handle can be used in other commands that need to reference the Audit Job you have created.
Return type : DBKey
Command Input :
Variable Name | Variable Type | Description |
|---|---|---|
jobName | String | Name of the Audit Job to be created. |
groupId | Integer | ID of the job group to which the Audit Job will be added. |
templateKey | DBKey | Handle to a template describing the assets to be audited. |
masterServerName | String | Name of the master server. |
targetServerName | String | Name of the target server. |
Example
The following example creates an Audit Job based on assets by comparing a live server to another live server. The example also shows how to obtain the various keys required in the final command.
Script
TARGET_SERVER="Server2"
TEMPLATE_GROUP="/Template_Group"
TEMPLATE="Template_Name"
JOB_NAME="Job Name"
JOB_GROUP_ID=`blcli JobGroup groupNameToId "/BLCli_Job_Group"`
TEMPLATE_KEY=`blcli Template getDBKeyByGroupAndName $TEMPLATE_GROUP $TEMPLATE`
LIVE_LIVE_AUDIT_JOB=`blcli AuditJob createLiveToLiveAuditJob $JOB_NAME $JOB_GROUP_ID /
$TEMPLATE_KEY $MASTER_SERVER $TARGET_SERVER`