SCAP - exportOvalLog


SCAP - exportOvalLog

Description :

If you run an SCAP Compliance Job with File retention mode ON, the OVAL interpreter creates the custom OVAL result files to send to the Application Server and retains files on the target server(s).

The retained files include the customized OVAL result files used by BMC Server Automation, a customized log file, the benchmark source files, and the SCAP external variables, list, and log files.

These files are stored in uniquely named folders on the target server(s).

This command lets you retrieve these folders from the target server(s), and store the folders in a location that you specify.

Return type : String

Command Input :

Variable Name

Variable Type

Description

jobRunKey

String

The run key of the SCAP Compliance Job run whose log files you want.

commaSepearatedServerName

String

The log files reside in folders on the target servers against which you ran the job. You can specify one of more target servers from which to retrieve log folders. Separate multiple target servers with commas, for example Target1,Target2,Target3.

nshPathToSaveLogFile

String

NSH path to a folder in which you want to save the retrieved log folders.

Example

This example exports the folder containing OVAL log files for a single target to a specified NSH location.

Script





# Get the DBKey of the SCAP Compliance Job

JOB_KEY=blcli SCAP getDBKeyByGroupAndName "/VLM" "MyJob"

# Get all the run keys for this Job.

blcli JobRun findAllRunKeysByJobKey $JOB_KEY

Result: DBKey:SJobRunModelKeyImpl:2000000-2000500

Result: DBKey:SJobRunModelKeyImpl:2000100-2000600

Result: DBKey:SJobRunModelKeyImpl:2000200-2000800

# For the most recent job run, export the OVAL log folder that resides  on a target server named myTarget.  Copy this folder to the /c/OVAL_logs folder on  a machine called myServer. Note the use of NSH notation to indicate the storage location.

SCAP exportOvalLog "DBKey:SJobRunModelKeyImpl:2000200-2000800" "myTarget" "//myServer/c/OVAL_logs"



 

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

BMC Server Automation Command Line Interface 8.7