3 Replies Latest reply on Feb 8, 2011 1:14 PM by Jim Campbell

    Need method to get NSH Script Job Run Log content using blcli commands

    Yanick Girouard

      We are investigating the possiility to run jobs (any kind, but mostly NSH Script Jobs) externally from a CTRL-M agent After running the job, we need to get the results (Exit Codes, Error messages, etc...) and return that to the CTRL-M agent so it can take appropriate action (i.e. open an incident ticket if the job failed and paste the full error message and exit code, or report a success with the results shown in the job run logs).


      When BMC presented the product to us, they confirmed this was possible, but I can't see how.


      I have managed to find the released commands that will allow us to run an NSH Script Job successfully, but have not found anything regarding the parsing or fetching of Job Run Logs, and this is what we mostly need.


      For example, an NSH Script Job is programmed to do echo "An error has occured ..." and then do "exit 5". In the BladeLogic GUI, I can see this text and the mention of "Exit Code 5" in the job run logs, but there's no way to get that information from the known blcli commands as far as I know.


      Is there a way to do so?


      I have seen a namespace in the unreleased commands that seem to pertain to JobLogItem and commands such as getMessage, which seems to match what I need, but there's no usage description for them, and most seem to require some sort of ComponentKey which I have no idea how to get.


      Has anyone ever managed to do what I need and would like to share? Or is this something only BMC's Profesionnal Services would be able to do for us?