Utility - exportComplianceDetailsServerReportWithServerName
Utility - exportComplianceDetailsServerReportWithServerName
Description :
This command exports the selected servers compliance job run result to a directory and gives you more control over the resulting output than other similar commands. The result is saved in a JSON and HTML format.
Return type : java.lang.Void
Command Input :
Variable Name | Variable Type | Description |
---|---|---|
runId | Integer | ID of the Compliance Job run whose results you want to export. |
serverName | String | Name of the server for which the report needs to be generated. |
exportDirName | String | Name of the directory that holds the export. |
Example
The following example shows how to export the selected job run result of a Compliance Job. To prepare for the export, we first get the job key, and use it to get the job run key; we then convert the job run key to a job run ID, and then we are finally ready to run the export command.
Script
JOB_RUN_KEY=`blcli JobRun findAllRunKeysByJobKey $JOB_DB_KEY`
JOB_RUN_ID=`blcli JobRun jobRunKeyToJobRunId $JOB_RUN_KEY`
COMPLIANCE_JOB_RUN_EXPORT=`blcli Utility exportComplianceDetailsServerReportWithServerName $JOB_RUN_ID "hostname" "//hostname/c/reports"`