This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Device discovery only works on primary polling engine on python API call

FormerMember
FormerMember

Hi all,

  I am using the code at orionsdk-python/discover_and_add_interfaces.py at master · solarwinds/orionsdk-python · GitHub 

to discover and add interfaces via python. Everything works well on primary polling engine i.e if I set the npm_server variable to

our primary engine there is no issue during discovery.

swis = SwisClient(npm_server, username, password)

    print("Discover and add interfaces:")

    results = swis.invoke('Orion.NPM.Interfaces', 'DiscoverInterfacesOnNode', 1)

however if I set the npm_server to any additional polling engines, I get the following error:

Discover Interfaces Solarwinds:  switch1.example.com

Traceback (most recent call last):

  File "./solar.py", line 120, in <module>

    example.discoverSolarwindsDevice(npm_server,npm_username,npm_password,ipAddress,nodeName)

  File "/usr/local/bin/class/examplenet.py", line 248, in discoverSolarwindsDevice

    results = swis.invoke('Orion.NPM.Interfaces', 'DiscoverInterfacesOnNode', OrionNodeID)

  File "/usr/local/lib/python3.5/dist-packages/orionsdk/swisclient.py", line 29, in invoke

    "Invoke/{}/{}".format(entity, verb), args).json()

  File "/usr/local/lib/python3.5/dist-packages/orionsdk/swisclient.py", line 59, in _req

    resp.raise_for_status()

  File "/usr/lib/python3/dist-packages/requests/models.py", line 840, in raise_for_status

    raise HTTPError(http_error_msg, response=self)

requests.exceptions.HTTPError: 400 Client Error: Verb Orion.NPM.Interfaces.DiscoverInterfacesOnNode: Cannot find assembly for url: https://polling-engine2.example.com:17778/SolarWinds/InformationService/v3/Json/Invoke/Orion.NPM.Interfaces/DiscoverInterfacesOnNode

I wonder what I am doing wrong here. Is there any other way to assign the discovery/polling to additional engines? Currently I have to discovery via primary engine and then manually assign on the web ui

to additional engines.

thanks a lot for any guidance in advance.

  • You can just always call the verb on the primary polling engine. It will take care of directing the actual discovery operation (SNMP queries) to the polling engine your node is assigned to.

  • FormerMember
    0 FormerMember in reply to tdanner

    thanks for the reply. I think I am dreaming as I saw an update thought it was on this thread that EngineID is the one determining which polling engine is assigned. This I didn't know. Once I change engineID

    and do the discovery on the primary, it worked like a charm.

    thanks!