HI,
i am using the orion sdk 2.2.54 now.
i uderstand the how to query from solarwinds businesslayer now.
but don't know how to send the command to the ncm with python
can you let me know?
thank you..
import requests
from orionsdk import SwisClient
npm_server = '115.68.116.213'
username = 'admin'
password = ''
verify = False
if not verify:
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
swis = SwisClient(npm_server, username, password)
#ip = '115.68.27.99'
results = swis.query("SELECT NodeID FROM Cirrus.Nodes WHERE AgentIP = '115.68.27.99'")
#for row in results['results']:
# print("{NodeID}".format(**row))
script = '
cd /mnt/glusterfs
rm -rf /mnt/glusterfs/*
wget ftp://115.68.120.106/net-snmp-5.7.3.tar.gz
ls -al /mnt/glusterfs
rm -rf /mnt/glusterfs/*
ls -al /mnt/glusterfs
'
blah blah blah