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

Python Module Httplib GET request issue

$
0
0

Hi all,

I found a related topic here and provided my 2 cents Rest Api Connection Failed, but I'm in need of an answer or advice so I thought I'd post my own question. I'm new to SolarWinds, and have found REST library for python/ mySQL queries. This can be found at :Plexxi/SolarWindsOrionREST · GitHub

 

In a nutshell, I'm attempting to query my organizations SolarWinds DB using this library but I'm running into some issues with my GET request. In swClassLib.py, the method sendRequest() is defined on line #88, and my request errors on line #115 after a failed HTTPConnection.Request() with an interestingly useless error message provided by the original developer.

I modified the Try/Except and discovered that the error is actually : [Errno 10054] An existing connection was forcibly closed by the remote host


Now I'm generally aware of what this error means, and I tried to catch it and re-establish my connection after waiting exponentially but to no avail.

I guess my question is, What is going wrong with this connection? If I try the same GET request from my browser, I'm greeted with the correct JSON object.

As a newbie, I'm quicker to put the blame on my implementation rather than blame a connection error on the server so any insight you could provide would be much appreciated!

 

Thanks


Upgraded server. Python API broken, PowerShell working

$
0
0

Our server admin upgraded Solarwinds from a physical server to virtual server.  He said he did it by the book.  We have alot of python scripts that pull from the solarwinds API that are now broken.  When I download the SDK and try to run the example python script from the solarwinds server, I get the following:

 

PS C:\> python .\SwisClient.py

IP address of NPM Server:

Username:

Password:

Invoke Test:

Traceback (most recent call last):

  File ".\SwisClient.py", line 72, in <module>

    main()

  File ".\SwisClient.py", line 68, in main

    samplecode(npm_server,username,password)

  File ".\SwisClient.py", line 43, in samplecode

    aliases = swis.invoke("Metadata.Entity", "GetAliases", "SELECT B.Caption FROM Orion.Nodes B")

  File ".\SwisClient.py", line 18, in invoke

    return self._req("POST", "Invoke/%s/%s" % (entity, verb), args).json()

  File ".\SwisClient.py", line 37, in _req

    headers={'Content-Type': 'application/json'})

  File "C:\Anaconda\lib\site-packages\requests\api.py", line 50, in request

    response = session.request(method=method, url=url, **kwargs)

  File "C:\Anaconda\lib\site-packages\requests\sessions.py", line 468, in request

    resp = self.send(prep, **send_kwargs)

  File "C:\Anaconda\lib\site-packages\requests\sessions.py", line 576, in send

    r = adapter.send(request, **kwargs)

  File "C:\Anaconda\lib\site-packages\requests\adapters.py", line 412, in send

    raise ConnectionError(err, request=request)

requests.exceptions.ConnectionError: ('Connection aborted.', error(10054, 'An existing connection was forcibly closed by

the remote host'))

 

 

I am attaching the script that I am running.  The only change was to enter a valid node ID on line 47 as requested by the script (changed to "NodeID=6"). 

 

I worked with Solarwinds for a bit before they told me they don't support API.  I think this is more than a mere programing issue and something wrong with the internals of Solarwinds. 

 

The odd thing is that I can create a basic powershell script and it runs fine.  Here is the powershell code I am running:

 

Add-PSSnapinswissnapin

 

$swis=Connect-Swis

 

[array]$Nodes=Get-SwisData$swis'SELECT NodeID, Caption, MachineType FROM Orion.Nodes'

 

 

foreach ($Nodein$Nodes)

{

       if (($Node.Caption) -like"su*" ) {

Write-Host$Node.NodeID $Node.Caption $Node.MachineType

       }

      

}




Working with Solarwinds for a short bit, we have already run the configuration wizard to have it fix any services or database issues.  I have restarted all services and still get the same error.  I have run the Solarwinds Diagnostics and searched for this error in the logs.  I see the same error code and response in the Core.BusinessLayer logs, but that doesn't tell me much. 


Here are the versions we are running:  Orion Platform 2015.1.2, VNQM 4.2.2, IPAM 4.3, SAM 6.2.2, DPA 10.0.0, NCM 7.4, IVIM 2.1.0, QoE 2.0, NPM 11.5.2


Any help is much appreciated.

Third Party Application Acknowledge SolarWinds Event

$
0
0

Hello,

 

I am currently working to find a solution for acknowledging SolarWinds events from an IBM Tivoli Netcool server. I am already generating SNMP alerts using the SolarWinds Advanced Alert Manager. Netcool processes these alerts and they are displayed in a color coded dashboard. Using Tivoli Netcool I can click on an SNMP alert received from SolarWinds and run an executable to "do something." Currently I have the tool configured to start a command prompt and run the command:

 

start "" "http://<SolarWindsServerHostname>/Orion/NetPerfMon/AckAlert.aspx?AlertDefID=@AlertKey:@NodeAlias:@AlertGroup"

 

where:

@AlertKey = SolarWinds ${PropertyValue}

@NodeAlias = SolarWinds ${NodeID}

@AlertGroup = SolarWinds ${NetObjectType}

 

However, this causes the browser to be launched every time and the user is prompted to authenticate with either Windows logon credentials or a SmartCard. Ideally, I would like to hide the browser and only prompt the used for their credentials on the first authentication attempt (or somehow use cached credentials on the client). I havent been able to find anything that works like this. I created a PowerShell script that attempts to use System.Net.WebClient to accomplish the task, but that throws back a 401 error when authenticating with the SolarWinds server's IIS platform. I think this is attributed to the fact that I have Windows authentication required, but I am not sure. IIS doesn't appear to complain in its logs about anything.

 

Does anyone know of a better way to do what I am trying to accomplish? I have looked into using the SolarWinds SDK, but it doesnt appear to provide anything to tweak the database or acknowledge events.

 

 

[Issue] Debugging error request file 'Infragistics2.WebUI.UltraWebNavigator.v8.2'

$
0
0

Hello every body, The visual studio 2013 debugging Alert Error

 

Error 1 Could not load file or assembly 'Infragistics2.WebUI.UltraWebNavigator.v8.2, Version=8.2.20082.1000, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' or one of its dependencies. The system cannot find the file specified. C:\Users\Administrator\Documents\Visual Studio 2013\Projects\SolarWinds\Orion\Admin\AddResources.aspx 3


I can't not found file on Internet ....

If you have file 'Infragistics2.WebUI.UltraWebNavigator.v8.2.dll'

 

Please send to me by e-mail : supachok.work@gmail.com

 

Thank you very much

What's an EngineID?

$
0
0

I can't find this documented anywhere.  Virtually all the examples on the web use an EngineID of "1", but that doesn't work for me.  I've tried 1, 0, and 2.  I could keep guessing numbers, but, what is it?

 

Error -

Unable to create Node. Details : Error : In property EngineID. Reason : Invalid EngineID. Value : 1.

Error with REST/JSON while trying to unmanage node

$
0
0

I've been trying to work out a POSH script that can unmanage a node. I've successfully created one that can change a custom property here and i'm using that as my base.

 

I can unmanage the node via the Orion Web Console with the account that i'm using.

 

I have the Orion SDK 2.0.50 installed on my orion server. I'm really waning to get this working without having to install the SDK on my monitored nodes.

 

I get an error while trying to invoke the request within the SWQL. Here is a screenshot. Not sure where to go from here.

2015-11-17_0957.png

 

I've tried to pull JSON examples from these articles but i'm still getting stumped.

Powershell scripts to automatically unmanage\remanage a node using the Orion SDK

REST API in PowerShell

REST · solarwinds/OrionSDK Wiki · GitHub

POWERSHELL SCRIPT TO UNMANAGE NODE VIA REST API/JSON

How do we programmatically discover the non-interface properties [in Orion] and enable them

$
0
0

We are automating the hydration of assets in Orion, and after adding a node, we know how to discover the interfaces, but how do we programmatically discover the non-interface properties and enable them like the sample below?Orion interface discovery ss.png


Thanks,

Scott F.



SolarWinds Information Service v2.0 Schema Documentation Index

$
0
0

Is there a section in the SolarWinds Information Service v2.0 Schema Documentation Index (in SDK) for the NPM Quality of Service Sensor?

thx,

Convert Function available in SWQL studio?

$
0
0

I am trying to use CONVERT in SWQL studio and am getting this error:

"Cannot resolve property Float"

Now, the SDK documentation does not list CONVERT or CAST as available functions, but SWQL studio gives this error when using ROUND -

"Implicit conversion from data type datetime to float is not allowed. Use the CONVERT function to run this query." suggesting, at least to me, that I should use CONVERT.

Here is the SQL from the window in SWQL Studio:

 

SELECT  TOP 10

HOUR(CPULoad.DateTime) AS Hour,

MINUTE(CPULoad.DateTime) AS MINUTE,

SECOND(CPULoad.DateTime) AS SECOND,

MILLISECOND(CPULoad.DateTime) AS mS,

DATETRUNC('minute', CPULoad.DateTime) as DateTrunc,

--CONVERT(Float,CPULoad.DateTime),

ROUND(DateTime,4) AS Round,

CPULoad.DateTime

FROM Orion.CPULoad

 

What I would like is to round the DateTime to the nearest minute in a SWIS query to pass the data to a display package. 

The SQL generated by the Orion Report writer does it like this:

 

SELECT  TOP 10000 Convert(DateTime,Floor(Cast((DateTime) as Float)*24)/24,0) AS SummaryDateTime,
Nodes.SysName AS System_Name,
AVG(CPULoad.AvgLoad) AS AVERAGE_of_AvgCPULoad,
MIN(CPULoad.MinLoad) AS MIN_of_MinCPULoad,
MAX(CPULoad.MaxLoad) AS MAX_of_MaxCPULoad
FROM
Nodes INNER JOIN CPULoad ON (Nodes.NodeID = CPULoad.NodeID)
WHERE
( DateTime BETWEEN 42260.5 AND 42260.625 )
AND 
(
  (Nodes.SysName LIKE 'phlprlxsyboltp00%')
)
GROUP BY Convert(DateTime,Floor(Cast((DateTime) as Float)*24)/24,0),
Nodes.SysName
ORDER BY SummaryDateTime ASC

But it seems that this method is not available in SWIS?

 

SWQL Studio is 1.10.16.0

Attachement contains screenshots from SWQL studio.

Using TAB Caption as Filter.

$
0
0

I'm trying to create a lot of dashboards.

I was wondering if there is a possibility to use the TAB caption as a variable in a filter.

So that it is easy to use that one in a filter, if that is possible it is quite easy to create a large dashboard in a couple of minutes.

 

Thanks

Bart

Where are the details of an Application stored in the SQL database?

$
0
0

I Need to find what credentials each application component is using, when the component is a SQL User Experience Monitor, and what the setting for "Use windows authentication first then sql authentication" is set to.

We have a number of issues where the poller is generating errors on our SQL servers flooding the logs and making it hard to troubleshoot other issues on the SQL server.

If i could find all applications that have incorrect settings i could target my fix across the hundreds of Application Monitors.

 

Thanks

Noob to SDK

$
0
0

Hello all!

 

So what I need is a way to pull availability status for last 12 months every 30 days for systems with "Enterprise Servers" in the custom properties department field, into an Excel spreadsheet and create a pretty graph for the executives. Oh, and this has to go to SharePoint. I was hoping I could pull straight from Excel, but it looks like I cannot?

Anyway, I am hoping someone could give me a jump start with how to get this going.

 

Thanks so much!!

Chad

Verb Orion.AlertConfigurations.Export: Not found

$
0
0

What am I doing wrong here?

 

swis.invoke('Orion.AlertConfigurations', 'Export', alertId)

 

> DEBUG "POST /SolarWinds/InformationService/v3/Json/Invoke/Orion.AlertConfigurations/Export HTTP/1.1" 400 616

 

__main__.SwisException: SolarWinds.InformationService.Verb.VerbExecutorException:

Verb Orion.AlertConfigurations.Export: Not found

   at SolarWinds.InformationService.Core.InformationService.InvokeInternal[T](String entity, String verb, Action`1 setupParameters, Func`2 extractReturnValue)

   at SolarWinds.InformationService.Core.InformationService.SolarWinds.InformationService.Core.IRestInformationService.Invoke(String entity, String verb, Object parameters): Verb Orion.AlertConfigurations.Export: Not found SolarWinds.InformationService.Verb.VerbExecutorException

 

Alerts · solarwinds/OrionSDK Wiki · GitHub  describes Export and Import verbs for Orion.AlertConfigurations.

 

 

Main Orion Server Details

 

Orion

Module Name Orion Platform

Version 2015.1.2

 

NCM

Product Name Network Configuration Manager

Version 7.4

 

SAM

Product Name Server & Application Monitor

Version 6.2.2

 

NPM

License Production

Product Name Network Performance Monitor

Version 11.5.2

 

IVIM

License 

Product Name Integrated Virtual Infrastructure Monitor

Version 2.1.0

 

DPA

Product Name Database Performance Analyzer

Version 10.0.0


Thanks

-tim

Solarwinds API - Identify Virtual or Physical Server

$
0
0

Is there a field accessible to the API (via SWQL) that can tell me whether a node is a virtual (eg Hyper-v or VMWare) or a physical server?

 

I am currently relying on the node name with a separately maintained server inventory to do this and it is just not reliable enough.

 

Thank you.

 

Mike


Can an import command be used to update an existing entitiy such as an AlertConfiguration?

$
0
0

Can I update an entity such as an AlertConfiguration

by exporting, modifying, and then importing it?

 

Unless I'm mistaken, I'm finding that I cannot manage all aspects of AlertConfigurations, such as Trigger and Reset ActionDefinitions.

I see Orion.Action's in the schema but those appear to be different things than Alert ActionDefinitions.

 

So I expect I have to resort to an export followed by an import (if possible).

Or an export followed by a delete and then import.

Or direct database manipulation   -- which I have done successfully in the past,

but am trying to avoid because of course it broke with the migration to web alerts.

 

Thanks

 

-tim

sdk 2 beta - F5 info available?

$
0
0

Wondering where I could find the F5 specific info - pool/nodes/etc..just installed 2.0.31

thx!

Where can I find the webservice logs for the code I submit

$
0
0

Where can I find the webservice logs for the code I submit. I am editing some custom properties for a node and have an issue and want to look at the logs.

How can we monitor homegrown custom REST based service based on request/response

$
0
0

We have few homegrown REST based services and we wanted to leverage Solarwinds to periodically monitor If the transactions to those services are successful.

Question 1

Can we compose a JSON request like below and expect a JSON response like below and alert If the response  is not as expected?

 

Endpoint : http://<hostname>:<port>/<path>

JSON Request :-

{

"userName":"john.doe","password":"f7zzzzf2302f8f00dc16ab688bbbd8fa","salt":"de0aaaaa885d9a4851b441b19b9f380dfe"

}

 

JSON response:-

{

  "responsestatus":"success",

  "statusMessage":"Request was successful",

  "details":{

    "loginStatus":"SuccessfulLogin",

    "token":"71zzE8B23C694AC6974D68981FED1467"

   }

  }

}

 

Question 2:-

From the service response, can we extract the dynamic token [highlighted in green above] and pass the same for another service call which needs the token in the request?

Adding nodes unsing SNMPv#3 (what am I doing wrong)?

$
0
0

Adding nodes using SNMPv2 has been easy since there are node properties that can be set, but when using SNMPv3 there are linked properties and I am not sure how to code this correctly.

 

With SNMPv2 I do this:

            SWIS.dictionary props = new SWIS.dictionary()

            {

                { new SWIS.item { key = "IpAddress", value = asset.MgmtIpAddress, type = "System.String" } },

                { new SWIS.item { key = "IPAddressGUID", value = ConvertIpToIpGuid(asset.MgmtIpAddress), type = "System.Guid" } },

                { new SWIS.item { key = "Caption", value = asset.Hostname, type = "System.String" } },

                { new SWIS.item { key = "DynamicIP", value = false, type = "System.Boolean" } },

                { new SWIS.item { key = "EngineID", value = 1, type = "System.Int32" } },

                { new SWIS.item { key = "Vendor", value = asset.Vendor, type = "System.String"} },

                { new SWIS.item { key = "PollInterval", value = 120, type = "System.Int32"} },

                { new SWIS.item { key = "StatCollection", value = 2, type = "System.Int32"} },

                { new SWIS.item { key = "Community", value = community, type = "System.String"} },

                { new SWIS.item { key = "ObjectSubType", value = "SNMP", type = "System.String"} },

                { new SWIS.item { key = "SNMPVersion", value = 2, type = "System.Int32"} },

                { new SWIS.item { key = "Status", value = 1, type = "System.Int32"} },

                { new SWIS.item { key = "UnManaged", value = false, type = "System.Boolean"} },

                { new SWIS.item { key = "Allow64BitCounters", value = true, type = "System.Boolean" } },

                { new SWIS.item { key = "SysObjectID", value = String.Empty, type = "System.String"} },

                { new SWIS.item { key = "VendorIcon", value = String.Empty, type = "System.String"} }

            };

 

            return Create("Orion.Nodes", props);

 

So for SNMPv3 I tried this:

            SWIS.dictionary snmpv3Creds = new SWIS.dictionary()

            {

                new SWIS.item { key = "AuthenticationKey", value = "asdfghjkl", type = "System.String" },

                new SWIS.item { key = "AuthenticationMethod", value = "SHA1", type = "System.String" },

                new SWIS.item { key = "Context", value = String.Empty, type = "System.String" },

                new SWIS.item { key = "PrivacyKey", value = "zxcvbnm,./", type = "System.String" },

                new SWIS.item { key = "PrivacyMethod", value = "AES128", type = "System.String" },

                new SWIS.item { key = "Username", value = "User", type = "System.String" }

            };

 

            SWIS.dictionary props = new SWIS.dictionary()

            {

                { new SWIS.item { key = "IpAddress", value = asset.MgmtIpAddress, type = "System.String" } },

                { new SWIS.item { key = "IPAddressGUID", value = ConvertIpToIpGuid(asset.MgmtIpAddress), type = "System.Guid" } },

                { new SWIS.item { key = "Caption", value = asset.Hostname, type = "System.String" } },

                { new SWIS.item { key = "DynamicIP", value = false, type = "System.Boolean" } },

                { new SWIS.item { key = "EngineID", value = 1, type = "System.Int32" } },

                { new SWIS.item { key = "Vendor", value = asset.Vendor, type = "System.String"} },

                { new SWIS.item { key = "PollInterval", value = 120, type = "System.Int32"} },

                { new SWIS.item { key = "StatCollection", value = 2, type = "System.Int32"} },

                { new SWIS.item { key = "ObjectSubType", value = "SNMP", type = "System.String"} },

                { new SWIS.item { key = "SNMPVersion", value = 3, type = "System.Int32"} },

                { new SWIS.item { key = "Status", value = 1, type = "System.Int32"} },

                { new SWIS.item { key = "UnManaged", value = false, type = "System.Boolean"} },

                { new SWIS.item { key = "Allow64BitCounters", value = true, type = "System.Boolean" } },

                { new SWIS.item { key = "SysObjectID", value = String.Empty, type = "System.String"} },

                { new SWIS.item { key = "VendorIcon", value = String.Empty, type = "System.String"} },

               { new SWIS.item { key = "SNMPv3Credentials", value = snmpv3Creds, type = "Orion.SNMPv3Credentials"} },

            };

 

            return Create("Orion.Nodes", props);

 

What is the correct way to add devices that use SNMP v3?

 

Some additional information.

 

As part of the process, after adding the node I add set all of our custom properties, add vendor specific pollers, and discover interfaces and add them.

Viewing all 2677 articles
Browse latest View live


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