3 Replies Latest reply on Dec 7, 2017 2:01 PM by Bill Robinson

    blcli get log items from batch job with "Execute by server" set

    Kevin Barry

      Hi all,


      I am trying to tease more information from the blcli at the command line after running a batch job via nsh script. Specifically: I'd like to see which job in a batch might have failed. For normal batch jobs, the JobRun - getLogItemsByJobRunId gives this info, but in the case of a batch job where "Execute by server" is set, it just shows a start and stop. I presume this is because it kicks off a "child" job for each server. So I would like to be able to get job run IDs for those "child" jobs. Is that possible?


      Currently I'm doing this:

      blcli_execute BatchJob getDBKeyByGroupAndName "$job_group" "$job_name" >/dev/null

      blcli_storeenv job_key


      blcli_execute Job executeAgainstServersForRunID "$job_key" "$targets" >/dev/null

      blcli_storeenv job_run_key


      blcli_execute JobRun jobRunKeyToJobRunId "$run_key" >/dev/null

      blcli_storeenv job_run_id


      blcli_execute JobRun getLogItemsByJobRunId "$job_key" "$job_run_id" >/dev/null

      blcli_storeenv job_log


      Any help would be appreciated!