Carbon Black Live Response - Wait Until Command Complete

Polling command status until finished with an error or complete.

Carbon Black Enterprise Live Response · 3 tasks · 2 inputs · 0 outputs

Details

IDCarbon Black Live Response - Wait Until Command Complete
From Version5.0.0
Tasks3

Inputs

  • CommnadId — Command ID to poll until completed.
  • SessionId — Session ID in which command executed.

Flowchart

Start Start GenericPolling - GenericPolling GenericPolling GenericPolling Command completed Command completed
id: Carbon Black Live Response - Wait Until Command Complete
version: -1
name: Carbon Black Live Response - Wait Until Command Complete
description: Polling command status until finished with an error or complete.
starttaskid: "0"
tasks:
  "0":
    id: "0"
    taskid: 01a8a99e-e5ac-43ed-8be7-3aec16f8aef2
    type: start
    task:
      id: 01a8a99e-e5ac-43ed-8be7-3aec16f8aef2
      version: -1
      name: ""
      description: ""
      iscommand: false
      brand: ""
    nexttasks:
      '#none#':
      - "1"
    separatecontext: false
    view: |-
      {
        "position": {
          "x": 450,
          "y": 50
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
  "1":
    id: "1"
    taskid: 160fb85a-14df-4a16-8599-68c5069fbc1c
    type: playbook
    task:
      id: 160fb85a-14df-4a16-8599-68c5069fbc1c
      version: -1
      name: GenericPolling
      description: |-
        Use this playbook as a sub-playbook to block execution of the master playbook until a remote action is complete.
        This playbook implements polling by continuously running the command in Step \#2 until the operation completes.
        The remote action should have the following structure:

        1. Initiate the operation.
        2. Poll to check if the operation completed.
        3. (optional) Get the results of the operation.
      playbookName: GenericPolling
      type: playbook
      iscommand: false
      brand: ""
    nexttasks:
      '#none#':
      - "2"
    scriptarguments:
      AdditionalPollingCommandArgNames:
        simple: session
      AdditionalPollingCommandArgValues:
        complex:
          root: inputs.SessionId
          transformers:
          - operator: Stringify
      Ids:
        complex:
          root: inputs.CommnadId
      Interval:
        simple: "1"
      PollingCommandArgName:
        simple: command
      PollingCommandName:
        simple: cb-command-info
      Timeout:
        simple: "10"
      dt:
        simple: CbLiveResponse.Commands(val.Status.toUpperCase() != 'COMPLETE'  &&
          val.Status.toUpperCase() != 'ERROR').CbCommandID
    separatecontext: false
    loop:
      iscommand: false
      exitCondition: ""
      wait: 1
      max: 100
    view: |-
      {
        "position": {
          "x": 450,
          "y": 230
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
  "2":
    id: "2"
    taskid: bb32c1a2-3db9-41c0-888b-7df7ed1e5ebd
    type: title
    task:
      id: bb32c1a2-3db9-41c0-888b-7df7ed1e5ebd
      version: -1
      name: Command completed
      type: title
      iscommand: false
      brand: ""
      description: ""
    separatecontext: false
    view: |-
      {
        "position": {
          "x": 450,
          "y": 430
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
view: |-
  {
    "linkLabelsPosition": {},
    "paper": {
      "dimensions": {
        "height": 445,
        "width": 380,
        "x": 450,
        "y": 50
      }
    }
  }
inputs:
- key: CommnadId
  value: {}
  required: true
  description: Command ID to poll until completed.
  playbookInputQuery:
- key: SessionId
  value: {}
  required: true
  description: Session ID in which command executed.
  playbookInputQuery:
outputs: []
fromversion: 5.0.0
tests:
- No test