discovery.scan

discovery.scan(target, company, outpost_id, scope)

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.

Where:

  • 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 Helix 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 of the BMC Discovery Outpost in the Manage > Outposts page.

  • scope is the identifier used to distinguish between endpoints in different address spaces. It is a string. If scope is not specified, the default scope is used. See Overlapping IP addresses for more information.

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("137.72.95.90", "BMC", "outpost01", "lon-scope");
log.debug("Did scan of %count% things"); 

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

Comments