JobRun - getServersStatusByJobRun

JobRun - getServersStatusByJobRun

Description :

This command gets the Server DBKey and its Status for the servers of the specified Job Run. This command returns a map of server DBKey and its status in the following format: {Server DBKey=Status, Server DBKey=Status, ...}. Statuses are: SUCESS = 0, WARNING = 1, ERROR = 2, NOT_RUN = 3

Return type : java.util.Map

Command Input :

Variable Name

Variable Type

Description

jobRunId

Integer

Job Run Id Number.

Example

The following example shows how to get the statuses of all servers for a specified job run id.

Script

blcli AgentInstallerJob getDBKeyByGroupAndName /AIJ_Fresh AIJ_Fresh
Sample output - DBKey:SJobModelKeyImpl:705-1-2036508

blcli JobRun findLastRunKeyByJobKey DBKey:SJobModelKeyImpl:705-1-2036508
Sample output - DBKey:SJobRunModelKeyImpl:623-2036509

blcli JobRun jobRunKeyToJobRunId DBKey:SJobRunModelKeyImpl:623-2036509
Sample output - 623

blcli JobRun getServersStatusByJobRun 623
Sample output - {DBKey:SDeviceKeyImpl:2=0, DBKey:SDeviceKeyImpl:3=0, DBKey:SDeviceKeyImpl:4=0, D
BKey:SDeviceKeyImpl:5=0, DBKey:SDeviceKeyImpl:6=0, DBKey:SDeviceKeyImpl:7=0, DBK
ey:SDeviceKeyImpl:8=0, DBKey:SDeviceKeyImpl:9=0, DBKey:SDeviceKeyImpl:10=0, DBKe
y:SDeviceKeyImpl:11=0, DBKey:SDeviceKeyImpl:12=1, DBKey:SDeviceKeyImpl:13=0}
Was this page helpful? Yes No Submitting... Thank you

Comments

  1. Ranu Ganguly

    Raised an internal defect to track the following 'Was This Page Helpful' comment:

    The status appears to be missing information to distinguish between a target 1. Waiting to start 2. Running 3. Completed successfully All 3 possible statuses are different, yet appear to be lumped into a general 'SUCCESSFUL' status. Why doesn't a target that has yet to start at least get 'NOT_RUN' as the status? But we'd still be missing the 'RUNNING' Is there another call that can give us more detailed information? The GUI appears to have the info... But not the CLI

    https://jira.bmc.com/browse/DRBLG-120708

    Oct 29, 2019 11:40