1 Reply Latest reply on Jul 28, 2017 11:39 AM by tdanner

    Python addition after discovery, find nodeid


      >>>nodeid = []


      >>>ImportConfiguration = {

      'DeleteProfileAfterImport': True,

      'NodeIDs': nodeid,

      'ProfileID': 48,


      >>>result = swis.invoke('Orion.Discovery', 'ImportDiscoveryResults', ImportConfiguration)




      Now that the node is "imported". How do I use this result to get the nodeid?

      I am not familiar with this result.


      Thank you,



        • Re: Python addition after discovery, find nodeid

          I added some text to the bottom of https://github.com/solarwinds/OrionSDK/wiki/Discovery describing what that "result" value is.


          The NodeID for the newly imported node(s) are in the Orion.DiscoveryLogItems entity. When you have "IsAutoImport: true" in the discovery config, then you can take the ProfileID of the discovery and look up a BatchID in Orion.DiscoveryLogs, then use that to find the entries in Orion.DiscoveryLogItems for your job.


          But in my testing with "IsAutoImport: false" and calling ImportDiscoveryResults after the fact, the BatchID in Orion.DiscoveryLogs does not match the BatchID in Orion.DiscoveryLogItems. It's like the separate import process has its own BatchID that is not recorded anywhere else. So that won't work.


          However, the combination of EngineID and IPAddress should be unique. So you can take the ProfileID from the discovery and find the IP addresses that were discovered in Orion.DiscoveredNodes. Then once the import is complete you can query Orion.Nodes with the EngineID that was used for the discovery and the IPs from Orion.DiscoveredNodes to get the real NodeIDs.

          1 of 1 people found this helpful