Quantcast
Channel: THWACK: Popular Discussions - Orion SDK
Viewing all 3719 articles
Browse latest View live

What do you think of this? Real time network map made from Solarwinds SWQL

$
0
0

So here is my latest project.  I have mapped out a network core using orion.npm.interfaces,  Orion.Routing.Neighbors, and Orion.NodeIPAddresses tables.  I basically query my network for interfaces matching a set description that I know to be existing on all core uplinks, then pull the ip address and interface index from ipaddresses table, then look in the orion.routing.neighbors table for a match to my nodes ip and populate that as a peer connection.  I am using OSPF as the routing protocol to map ospf adjaceny, but you could use whatever protocol you use for an igp.  I use my interface details including node name and interface stats and peer to build network nodes and connect them via edges using visjs library.  I am sorry you cant see much as I had to blur it out to protect proprietary network information.  But each node has its hostname label and each interface if you hover over it shows traffic stats, errors, discards, etc in real time (well since last refresh).  I plan to make the links double in width every time it goes from meg  to 10 meg, 100 meg, gig etc so the thickness will demonstrate how busy the link is.  Nodes and interfaces will also soon color code to current status.  I think its pretty cool.  What do you guys think?  I am also thinking about a view option where you select a node id and a number then graphing that node as center of universe and showing all connections from that node out to the level you select.  What I mean is if you picked node and 1 it would show all neighbors...if you picked node and 2 it would show all neighbors and their neighbor...etc etc.  Basically if you have a regional problem you could zoom out a few levels and quickly look at stats on the links in that region.

 

 

enjoy!

 

 

 

 

 

 

OSPF Adjacency Visualization


API with EOC

$
0
0

So I discovered that you can query EOC with the API....providing data from every instance of SolarWinds in my environment....and I've given out a couple of queries to others for dashboard purposes.

We have an Orion instance that is down and that seems to break getting any data.

Message":"Site XX.XX.XX.XX - 112\/13 is Down","ExceptionType":"SolarWinds.Orion.EOC.Data.Models.SiteDownException","FullException":"SolarWinds.Orion.EOC.Data.Models.SiteDownException: Site XX.XX.XX.XX - 112\/13 is Down

 

If I do the query in SWQL Studio, I get results (minus results from the instance that is down).

 

Is there a way to get results from the Orion instances that remain up via the CURL statement without it breaking since a site is down?

 

tdanner

No snap-ins have been registered for Windows PS v. 5.0

$
0
0

Hi Thwack,

 

As I was trying to unmanage whole groups at a time I stumbled upon OrionSDK and with that, PowerOrion.

I have installed OrionSDK and copied the PowerOrion directory to C:\Windows\System32\WindowsPowerShell\v1.0\Modules\.

Whenever I try to either Import-Module PowerOrion or Add-PSSnapin SwisSnapin I get this:

 

PS C:\Company> Add-PSSnapin SwisSnapin 

Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 5.

At line:1 char:1

+ Add-PSSnapin SwisSnapin

+ ~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidArgument: (SwisSnapin:String) [Add-PSSnapin], PSArgumentException

    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand

 

 

 

PS C:\Company> Import-Module PowerOrion

Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 5.

At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PowerOrion\PowerOrion.psm1:5 char:1

+ Add-PSSnapin SwisSnapin

+ ~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidArgument: (SwisSnapin:String) [Add-PSSnapin], PSArgumentException

    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand

 

I've tried running the following without success: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe 'C:\Program Files (x86)\SolarWinds\Orion SDK\SWQL Studio\SwisPowerShell.dll'

 

Any help is greatly appreciated.

 

Glad Regards,

Frederik Bruun

Can anyone provide an example of how to supress alerts using the rest API, I've stumbled around but I can't seem to get it to work.

Python API

$
0
0

Is there an API I can connect to with Python?

I would like to query IPAM with Ansible/Python

Thanks.

No snap-ins have been registered for Windows PS v. 5.0

$
0
0

Hi Thwack,

 

As I was trying to unmanage whole groups at a time I stumbled upon OrionSDK and with that, PowerOrion.

I have installed OrionSDK and copied the PowerOrion directory to C:\Windows\System32\WindowsPowerShell\v1.0\Modules\.

Whenever I try to either Import-Module PowerOrion or Add-PSSnapin SwisSnapin I get this:

 

PS C:\Company> Add-PSSnapin SwisSnapin 

Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 5.

At line:1 char:1

+ Add-PSSnapin SwisSnapin

+ ~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidArgument: (SwisSnapin:String) [Add-PSSnapin], PSArgumentException

    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand

 

 

 

PS C:\Company> Import-Module PowerOrion

Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 5.

At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PowerOrion\PowerOrion.psm1:5 char:1

+ Add-PSSnapin SwisSnapin

+ ~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidArgument: (SwisSnapin:String) [Add-PSSnapin], PSArgumentException

    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand

 

I've tried running the following without success: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe 'C:\Program Files (x86)\SolarWinds\Orion SDK\SWQL Studio\SwisPowerShell.dll'

 

Any help is greatly appreciated.

 

Glad Regards,

Frederik Bruun

how to input 'y' or 'yes' with powershell script to NCM

$
0
0

Hello, Team

is anybody who can give me an idea how to input the 'yes' or 'y' command when waiting for the user input.

want to automate the Nexus 3048 ios upgrade process with powershell script with NCM.

 

Also, powershell script can apply for multiple devices at the same time for example upgrade 100 devices at the same time for 1 powershell script.

 

for example

Images will be upgraded according to following table:

Module             Image         Running-Version             New-Version  Upg-Required

------  ----------------  ----------------------  ----------------------  ------------

     1            system             6.0(2)U1(2)             6.0(2)U3(1)           yes

     1         kickstart             6.0(2)U1(2)             6.0(2)U3(1)           yes

     1              bios      v1.2.0(08/25/2011)      v1.2.0(08/25/2011)            no

     1         power-seq                    v4.4                    v4.4            no

 

 

Switch will be reloaded for disruptive upgrade.

Do you want to continue with the installation (y/n)?  [n] y   <--- here, how to input 'y' command with powershell script ??

 

Install is in progress, please wait.

Performing runtime checks.

[####################] 100% -- SUCCESS

Setting boot variables.

[####################] 100% -- SUCCESS

Performing configuration copy.

[####################] 100% -- SUCCESS

Finishing the upgrade, switch will reboot in 10 seconds.

as20a.w40216b.x460.krccw#

How to use RESTful API

$
0
0

I have a large number of linux systems for which I need to do a number of SolarWinds configuration tasks, but lets pick one:

 

The systems have registered themselves by running swiagent in push mode.  By default, they're monitoring CPU and memory and network traffic.  I want them to monitor specific file system mounts (/, /tmp, and /var) and not others (not /boot, since it doesn't change, and not /projects, because it's an NFS mount - monitor that on the filer).

 

I'd like to automate turning on that monitoring from the Linux systems themselves, and the RESTful API would seem to be a good way to do that.  I presume I need to retrieve the NodeID, then retrieve some identifier for the volume, then invoke some verb to enable monitoring of the volume.

 

These curl invocations work:

 

curl --user 'swiagent:*************' -k https://10.1.1.248:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+Uri+FROM+Orion.Nodes+WHERE+Caption+=+\'apk0clio00\' | python -mjson.tool

curl --user 'swiagent:*************' -k https://10.1.1.248:17778/SolarWinds/InformationService/v3/Json/swis://pdx0netmgmt01.tqs.com/Orion/Orion.Nodes/NodeID=6079 | python -mjson.tool

 

But this doesn’t:

 

curl --user 'swiagent:*************' -k https://10.1.1.248:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+Uri+FROM+Orion.Nodes.Volumes+WHERE+NodeID=6079 | python -mjson.tool

 

I feel like there's important things I don't understand, and I don't know how to find the answers - and my search results show I don't know how to ask the questions.


API with EOC

$
0
0

So I discovered that you can query EOC with the API....providing data from every instance of SolarWinds in my environment....and I've given out a couple of queries to others for dashboard purposes.

We have an Orion instance that is down and that seems to break getting any data.

Message":"Site XX.XX.XX.XX - 112\/13 is Down","ExceptionType":"SolarWinds.Orion.EOC.Data.Models.SiteDownException","FullException":"SolarWinds.Orion.EOC.Data.Models.SiteDownException: Site XX.XX.XX.XX - 112\/13 is Down

 

If I do the query in SWQL Studio, I get results (minus results from the instance that is down).

 

Is there a way to get results from the Orion instances that remain up via the CURL statement without it breaking since a site is down?

 

tdanner

Invoke-SwisVerb - Access Denied

$
0
0

I was advised by SolarWinds support to post a question on the community forms.  I am trying to run the below command and receive access is denied errors.  The account is a full admin on the server and in the IPAM application.  Any help would be greatly appreciated.

 

'Invoke-SwisVerb $swis IPAM.SubnetManagement GetFirstAvailableIp @("10.99.99.0", "24")'. 

 

Can anyone provide an example of how to supress alerts using the rest API, I've stumbled around but I can't seem to get it to work.

Receiving 403 Forbidden When Using REST API In C#

$
0
0

Receiving 403 Forbidden When Using REST API In C#

 

I was referred to the following C# example of using REST APIs Sample code: OrionSDK/Program.cs at master · solarwinds/OrionSDK · GitHub

 

This looked very promising and I have attempted to implement it for my process. However, all requests are failing with a 403 Forbidden error.

 

I have verified if I used invalid credentials I get a 401 unauthorized error so it appears to be authenticating my request, but I can't get results for a simple query operation.

 

I am basically using the code from the example but I am only calling the query action with the following simple query string and no arguments:

conststring query = @"SELECT nodeid, caption FROM Orion.Nodes";

 

I have output the JSON string created before it is passed to the request and it looks like this:

{"parameters":null,"query":"SELECT nodeid, caption FROM Orion.Nodes"}

 

Is there something wrong with the JSON or my query request?

how to input 'y' or 'yes' with powershell script to NCM

$
0
0

Hello, Team

is anybody who can give me an idea how to input the 'yes' or 'y' command when waiting for the user input.

want to automate the Nexus 3048 ios upgrade process with powershell script with NCM.

 

Also, powershell script can apply for multiple devices at the same time for example upgrade 100 devices at the same time for 1 powershell script.

 

for example

Images will be upgraded according to following table:

Module             Image         Running-Version             New-Version  Upg-Required

------  ----------------  ----------------------  ----------------------  ------------

     1            system             6.0(2)U1(2)             6.0(2)U3(1)           yes

     1         kickstart             6.0(2)U1(2)             6.0(2)U3(1)           yes

     1              bios      v1.2.0(08/25/2011)      v1.2.0(08/25/2011)            no

     1         power-seq                    v4.4                    v4.4            no

 

 

Switch will be reloaded for disruptive upgrade.

Do you want to continue with the installation (y/n)?  [n] y   <--- here, how to input 'y' command with powershell script ??

 

Install is in progress, please wait.

Performing runtime checks.

[####################] 100% -- SUCCESS

Setting boot variables.

[####################] 100% -- SUCCESS

Performing configuration copy.

[####################] 100% -- SUCCESS

Finishing the upgrade, switch will reboot in 10 seconds.

as20a.w40216b.x460.krccw#

No snap-ins have been registered for Windows PS v. 5.0

$
0
0

Hi Thwack,

 

As I was trying to unmanage whole groups at a time I stumbled upon OrionSDK and with that, PowerOrion.

I have installed OrionSDK and copied the PowerOrion directory to C:\Windows\System32\WindowsPowerShell\v1.0\Modules\.

Whenever I try to either Import-Module PowerOrion or Add-PSSnapin SwisSnapin I get this:

 

PS C:\Company> Add-PSSnapin SwisSnapin 

Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 5.

At line:1 char:1

+ Add-PSSnapin SwisSnapin

+ ~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidArgument: (SwisSnapin:String) [Add-PSSnapin], PSArgumentException

    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand

 

 

 

PS C:\Company> Import-Module PowerOrion

Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 5.

At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PowerOrion\PowerOrion.psm1:5 char:1

+ Add-PSSnapin SwisSnapin

+ ~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidArgument: (SwisSnapin:String) [Add-PSSnapin], PSArgumentException

    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand

 

I've tried running the following without success: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe 'C:\Program Files (x86)\SolarWinds\Orion SDK\SWQL Studio\SwisPowerShell.dll'

 

Any help is greatly appreciated.

 

Glad Regards,

Frederik Bruun

SWIS REST/JSON API

$
0
0

Starting with NPM 10.4, SWIS now supports a REST/JSON API in addition to the existing SOAP API. The operations supported by each API are identical: the six basic operations of Query, Invoke, Create, Read, Update, and Delete; and the data you can access through each API is the same. The difference is that the REST/JSON API avoids the complexities of XML and SOAP, though it gives up the ability to have a client wrapper generated from WSDL.

 

Both APIs will be supported by the product indefinitely - the SOAP API is not deprecated or replaced by the REST API.

 

Request and Response Formats

Query

Request

GET https://localhost:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+Uri+FROM+Orion.Pollers+ORDER+BY+PollerID+WITH+ROWS+1+TO+3+WITH+TOTALROWS HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*

Response

HTTP/1.1 200 OK
Content-Length: 244
Content-Type: application/json
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 27 Jul 2012 19:38:52 GMT
{"totalRows":13,"results":[{"Uri":"swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=4"},{"Uri":"swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=6"},{"Uri":"swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=7"}]}

 

Body reformatted for easier reading
{

 

    "totalRows": 13,

    "results": [

        { "Uri": "swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=4"},

        { "Uri": "swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=6"},

        { "Uri": "swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=7"}

    ]

}

Query with Parameters

Request

POST https://localhost:17778/SolarWinds/InformationService/v3/Json/Query HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*
Content-Type: application/json
Content-Length: 130
{"query":"SELECT Uri FROM Orion.Pollers WHERE PollerID=@p ORDER BY PollerID WITH ROWS 1 TO 3 WITH TOTALROWS","parameters":{"p":9}}

 

Response

HTTP/1.1 200 OK
Content-Length: 99
Content-Type: application/json
Server: Microsoft-HTTPAPI/2.0
Date: Tue, 07 Aug 2012 17:36:27 GMT
{"totalRows":1,"results":[{"Uri":"swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=9"}]}

Invoke

Request

POST https://localhost:17778/SolarWinds/InformationService/v3/Json/Invoke/Metadata.Entity/GetAliases HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*
Content-Type: application/json
Content-Length: 39
["SELECT B.Caption FROM Orion.Nodes B"]

Response

HTTP/1.1 200 OK
Content-Length: 19
Content-Type: application/json
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 27 Jul 2012 19:23:27 GMT
{"B":"Orion.Nodes"}

The Metadata.GetAliases verb takes one string argument and returns a PropertyBag.

Create

Request

POST https://localhost:17778/SolarWinds/InformationService/v3/Json/Create/Orion.Pollers HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*
Content-Type: application/json
Content-Length: 92
{"PollerType":"hi from curl 2", "NetObject":"N:123", "NetObjectType":"N", "NetObjectID":123}

Response

HTTP/1.1 200 OK
Content-Length: 69
Content-Type: application/json; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 27 Jul 2012 19:27:11 GMT
"swis:\/\/tdanner-dev.swdev.local\/Orion\/Orion.Pollers\/PollerID=19"

Read

Request

GET https://localhost:17778/SolarWinds/InformationService/v3/Json/swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=6 HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*

Response

HTTP/1.1 200 OK
Content-Length: 245
Content-Type: application/json
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 27 Jul 2012 19:30:02 GMT
{"PollerID":6,"PollerType":"V.Details.SNMP.Generic","NetObject":"V:1","NetObjectType":"V","NetObjectID":1,"DisplayName":null,"Description":null,"InstanceType":"Orion.Pollers","Uri":"swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=6"}

Update

Request

POST https://localhost:17778/SolarWinds/InformationService/v3/Json/swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=6 HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*
Content-Type: application/json
Content-Length: 29
{"PollerType":"hi from curl"}

Response

HTTP/1.1 200 OK
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 27 Jul 2012 19:32:06 GMT

Delete

Request

DELETE https://localhost:17778/SolarWinds/InformationService/v3/Json/swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=16 HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*

Response

HTTP/1.1 200 OK
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 27 Jul 2012 19:37:33 GMT

Receiving 403 Forbidden When Using REST API In C#

$
0
0

Receiving 403 Forbidden When Using REST API In C#

 

I was referred to the following C# example of using REST APIs Sample code: OrionSDK/Program.cs at master · solarwinds/OrionSDK · GitHub

 

This looked very promising and I have attempted to implement it for my process. However, all requests are failing with a 403 Forbidden error.

 

I have verified if I used invalid credentials I get a 401 unauthorized error so it appears to be authenticating my request, but I can't get results for a simple query operation.

 

I am basically using the code from the example but I am only calling the query action with the following simple query string and no arguments:

conststring query = @"SELECT nodeid, caption FROM Orion.Nodes";

 

I have output the JSON string created before it is passed to the request and it looks like this:

{"parameters":null,"query":"SELECT nodeid, caption FROM Orion.Nodes"}

 

Is there something wrong with the JSON or my query request?

Find port and switch for a given IPAddress

$
0
0

I'm attempting to get the port and switch for some IP Addresses that are connected and in use.  We have the Switch Port Mapping Tool - Switch Port Checker | SolarWinds  searching for an IP via the web interface, I can get the switch and port information, but when I attempt to get the same with SWQL, I haven't had any luck.  Can anyone provide some advice as to which tables this uses?

 

Raw non UDT based.

SELECT P.PortID      , P.IfIndex      , P.VlanId      , P.PortType     , p.Description     , N.IPAddress     , N.DisplayName
FROM Orion.NodePortInterfaceMap AS P
JOIN Orion.Nodes AS N ON N.NodeID = P.NodeId
WHERE N.IPAddress = '#.#.#.#' -- with a real IP Address

 

UDT based.

SELECT N.DisplayName     , N.IPAddress     , P.PortDescription     , P.PortIndex
FROM Orion.Nodes N
INNER JOIN Orion.UDT.Port AS P on P.NodeID=N.NodeID 
WHERE N.IPAddress = '#.#.#.#' -- with a real IP Address

 

Thanks in advance.

how to input 'y' or 'yes' with powershell script to NCM

$
0
0

Hello, Team

is anybody who can give me an idea how to input the 'yes' or 'y' command when waiting for the user input.

want to automate the Nexus 3048 ios upgrade process with powershell script with NCM.

 

Also, powershell script can apply for multiple devices at the same time for example upgrade 100 devices at the same time for 1 powershell script.

 

for example

Images will be upgraded according to following table:

Module             Image         Running-Version             New-Version  Upg-Required

------  ----------------  ----------------------  ----------------------  ------------

     1            system             6.0(2)U1(2)             6.0(2)U3(1)           yes

     1         kickstart             6.0(2)U1(2)             6.0(2)U3(1)           yes

     1              bios      v1.2.0(08/25/2011)      v1.2.0(08/25/2011)            no

     1         power-seq                    v4.4                    v4.4            no

 

 

Switch will be reloaded for disruptive upgrade.

Do you want to continue with the installation (y/n)?  [n] y   <--- here, how to input 'y' command with powershell script ??

 

Install is in progress, please wait.

Performing runtime checks.

[####################] 100% -- SUCCESS

Setting boot variables.

[####################] 100% -- SUCCESS

Performing configuration copy.

[####################] 100% -- SUCCESS

Finishing the upgrade, switch will reboot in 10 seconds.

as20a.w40216b.x460.krccw#

How to use RESTful API

$
0
0

I have a large number of linux systems for which I need to do a number of SolarWinds configuration tasks, but lets pick one:

 

The systems have registered themselves by running swiagent in push mode.  By default, they're monitoring CPU and memory and network traffic.  I want them to monitor specific file system mounts (/, /tmp, and /var) and not others (not /boot, since it doesn't change, and not /projects, because it's an NFS mount - monitor that on the filer).

 

I'd like to automate turning on that monitoring from the Linux systems themselves, and the RESTful API would seem to be a good way to do that.  I presume I need to retrieve the NodeID, then retrieve some identifier for the volume, then invoke some verb to enable monitoring of the volume.

 

These curl invocations work:

 

curl --user 'swiagent:*************' -k https://10.1.1.248:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+Uri+FROM+Orion.Nodes+WHERE+Caption+=+\'apk0clio00\' | python -mjson.tool

curl --user 'swiagent:*************' -k https://10.1.1.248:17778/SolarWinds/InformationService/v3/Json/swis://pdx0netmgmt01.tqs.com/Orion/Orion.Nodes/NodeID=6079 | python -mjson.tool

 

But this doesn’t:

 

curl --user 'swiagent:*************' -k https://10.1.1.248:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+Uri+FROM+Orion.Nodes.Volumes+WHERE+NodeID=6079 | python -mjson.tool

 

I feel like there's important things I don't understand, and I don't know how to find the answers - and my search results show I don't know how to ask the questions.

Python API

$
0
0

Is there an API I can connect to with Python?

I would like to query IPAM with Ansible/Python

Thanks.

Viewing all 3719 articles
Browse latest View live