December 2018
Intermediate to advanced
226 pages
4h 57m
English
As a network engineer, there are times when we need to interact with monitoring tools for various tasks. Let's see a basic example in which we connect to the SolarWinds Server and fetch the IP address of a particular router.
The code to initialize the connection and fetch information from SolarWinds, is as follows:
import requestsfrom orionsdk import SwisClientnpm_server = 'npm_serverip'username = 'test'password = 'test123'verify = Falseif not verify: from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning)swis = SwisClient(npm_server, username, password)keyvalue="mytestrouter"results = swis.query("SELECT Caption AS NodeName, IPAddress ...Read now
Unlock full access