This documentation supports the 20.02 (12.0) version of BMC Discovery.

To view an earlier version of the product, select the version from the Product version menu.


discovery.scan(target, company, outpost_id)

Adds an open scan for the given target and returns a count of the number of endpoints included in the open scan.

Requires that you have a scheduled scan defined that includes the address or addresses of the scan targets, and that the Allow patterns to scan in this range check box is checked for that scan. The scheduled scan does not need to be in its specified scan time window.


  • target is a:
    • string (IP address)
    • list of IP addresses
    • node, which is one of the following:
      • Host
      • Mainframe
      • ManagementController
      • MFPart
      • NetworkDevice
      • Printer
      • SNMPManagedDevice
      • StorageDevice
      • LoadBalancerMember
      • DiscoveryAccess
    • nodeset
      Any nodes which are of the incorrect kind are ignored.
  • company is the name of a company in a BMC Discovery system with multitenancy configured.
  • outpost_id is the name or ID of the BMC Discovery Outpost that you want to perform the scan. 

    You can determine the name or ID of the BMC Discovery Outpost using the tw_reasoningstatus utility. For example: 

    [tideway@appliance01 ~]$ tw_reasoningstatus --username=system --discovery-outposts
      Name:           outpost01
      Id:             6fa1b63871646f6a1e800a3123e30b38
      Scan Ranges:    Allow all IPs
      Exclude Ranges: None
      Version: (release 807173)
      Last contact:
        Discovery_Appliance: 2020-05-06 14:13:17 BST
    [tideway@appliance01 ~]$

The following is a simple example adding a snapshot scan for a specific IP address, with the company BMC, using BMC Discovery Outpost called outpost01:

count := discovery.scan("", "BMC", "outpost01");
log.debug("Did scan of %count% things"); 

Was this page helpful? Yes No Submitting... Thank you