Utility - exportJSONServerDetailedReport
Utility - exportJSONServerDetailedReport
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. |
serverId | Integer | ID of the server for which the report needs to be generated. |
exportDirectory | String | Name of the directory that holds the export. This field accepts a valid NSH path in the following format: //serverName/<path to dir>/fileName. If you provide a local path, /<path to dir>/fileName, the local path is created on the application server and the export is stored in that path. |
Example
The following example shows how to export the selected job run result of a Compliance Job.
Script
JOB_DB_KEY=`blcli ComplianceJob getDBKeyByGroupAndName "/sampleJobGroup" "sampleJob"`
JOB_RUN_KEY=`blcli JobRun findAllRunKeysByJobKey $JOB_DB_KEY`
JOB_RUN_ID=`blcli JobRun jobRunKeyToJobRunId $JOB_RUN_KEY`
REPORT_EXPORT=`blcli Utility exportJSONServerDetailedReport $JOB_RUN_ID $SERVER_ID "//hostname/c/reports"`