Having trouble adding a Node to NCM with Python 3.8. I'm able to add a new node and add it to pollers via the API. I get an error when I add it to NCM using invoke on Cirrus.Nodes. AddNodeToNCM. I'm on OrionPlatform 2017.3.5 SP5, NPM 12.2 NCM 7.7
Based on the below post, it looks like I'm following the correct process.
https://thwack.solarwinds.com/t5/Orion-SDK-Discussions/Add-node-or-something-to-NCM-NPM/m-p/262271
1) Create on Orion.Nodes (Works)
2) Create on Orion.Pollers (Works)
3) Invoke on Cirrus.Nodes. AddNodeToNCM (fails)
Below Code is from IDE Testing
C:\Windows>python
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02) [MSC v.1924 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> from orionsdk import SwisClient
>>>
>>> npm_server = 'solarwinds.local'
>>> username = 'username'
>>> password = 'password'
>>> swis = SwisClient(npm_server, username, password)
>>> requests.packages.urllib3.disable_warnings()
>>>
>>> nodeIp = '10.109.139.1'
>>> nodeLookup = swis.query('SELECT NodeID, DisplayName FROM Orion.Nodes where IPAddress=@IPAddress', IPAddress=nodeIp)
>>> nodeLookup
{'results': [{'NodeID': 13107, 'DisplayName': '1003333'}]}
>>> nodeId = nodeLookup['results'][0]['NodeID']
>>> nodeId
13107
>>>
>>> ip_check = swis.query('SELECT NodeID FROM Cirrus.Nodes WHERE AgentIP=@ip_address', ip_address=nodeIp)
>>> ip_check
{'results': []}
>>>
>>> nodeNcm = swis.invoke('Cirrus.Nodes', 'AddNodeToNCM', nodeId)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\user\AppData\Roaming\Python\Python38\site-packages\orionsdk\swisclient.py", line 29, in invoke
return self._req(
File "C:\Users\user\AppData\Roaming\Python\Python38\site-packages\orionsdk\swisclient.py", line 63, in _req
resp.raise_for_status()
File "C:\Users\user\AppData\Roaming\Python\Python38\site-packages\requests\models.py", line 941, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: There was no endpoint listening at net.pipe://localhost/orion/ncm/businesslayer that could
accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. for url:
solarwinds.local:17778/.../AddNodeToNC...
>>>