Quantcast
Channel: THWACK: All Content - Orion SDK
Viewing all articles
Browse latest Browse all 2677

Orion sdk using Python to query Solarwinds Database

$
0
0

By using the orion sdk with python,Can someone suggest how do we write an script for querying the MSSQL database in solarwinds or any samples using python sdk.   Tried something to query but didn't work  

swis = orionsdk.SwisClient("dbserver", "username", "password")

 

aliases = swis.query("SELECT * from SOLARWINDS_ORION.dbo.NodesData")

 

Not able to connect to the server, getting connection failure for this url, 'https://dbserver:17778/SolarWinds/InformationService/v3/Json/'

getting the following error:

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='dbserver', port=17778): Max retries exceeded with url: /SolarWinds/InformationService/v3/Json/Query (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001F5DC7A9588>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))

 

Do we need to run any service before running the query script on the dbserver so that the server listens at the specified port?

Would Appreciate if anyone could help me on this.


Viewing all articles
Browse latest Browse all 2677

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>