-
1. Re: PatchAnalysis Unreleased blcli command
Bill RobinsonJun 16, 2016 6:48 AM (in response to Steve Abercrombie)
why won't Utility.exportPatchAnalysisRun work? you can export it to wherever the blcli is running and then copy or move it w/ nsh.
-
2. Re: PatchAnalysis Unreleased blcli command
Steve Abercrombie Jun 16, 2016 8:32 AM (in response to Bill Robinson)I probably just don't know the syntax then because the only syntax that I've seen has it exporting to your local machine versus onto a server somewhere. How would a dump it out to a remote server location?
-
3. Re: PatchAnalysis Unreleased blcli command
Bill RobinsonJun 16, 2016 8:43 AM (in response to Steve Abercrombie)
You do the export to a local machine. Then use cp or mv to get it to the other server (assuming it has the rscd installed and you have access) – eg mv file.csv //server/dir
-
4. Re: PatchAnalysis Unreleased blcli command
Steve Abercrombie Jun 16, 2016 8:47 AM (in response to Bill Robinson)Would I do with a "./something.csv" then to export it to which BladeLogic server is running the job? I want to have it run as a scheduled task where I don't have to be at my workstation for it to run. Will this work?
-
5. Re: PatchAnalysis Unreleased blcli command
Bill RobinsonJun 16, 2016 8:49 AM (in response to Steve Abercrombie)
Can you elaborate on exactly what you need to do here?
You run a patching job, then you want to export the results to a file and then what ? what about emailing the results from the job notification options ?
-
6. Re: PatchAnalysis Unreleased blcli command
Steve Abercrombie Jun 16, 2016 8:58 AM (in response to Bill Robinson)Yes, I want a job that I can set on a monthly scheduled basis that will only do the patch analysis part and then export the csv to a server where I can then manipulate the results to only show the missing patches. Then I want to have that email out to a customer. The parts that I'm missing is how to get it to that server and also how (if possible) to utilize the BladeLogic sendmail to send the email out. As far as the email is concerned, I don't know if I'll have to do it that way or have to use an SMTP relay.
-
7. Re: PatchAnalysis Unreleased blcli command
Bill RobinsonJun 16, 2016 7:29 PM (in response to Steve Abercrombie)
so you'd do like:
blcli_execute PatchingJob getDBKeyByGroupAndName "/workspace" "patchingJob'
blcli_storeenv jobKey
blcli_execute Job executeJobAndWait ${jobKey}
blcli_storeenv jobRunKey
blcli_execute JobRun jobRunKeyToJobRunId ${jobRunKey}
blcli_storeenv jobRunId
blcli_execute Utility exportPatchAnalysisRuns ${jobKey} ${jobRunId} /tmp/result.csv null CSV simple
sed / awk /whatever < result.csv > /tmp/result_parsed.csv
blcli_execute Email sendMailWithAttachment from@foo.com to@foo.com "Subject" "body" /tmp result.csv
or, you can use the built in notification on the job and attach the results. you won't get to parse it, but it's a lot more straightforward than the above.