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

How to get SWQL Studio to Login with AD account ?

$
0
0

I setup an individual windows account in Solarwinds with my company’s AD. I keep getting a connection error unable to connect to information service. An error occurred when verifying for the message.

I checked and stopped and restated the Solarwinds information service and Solarwinds information service 3.  It still will not connect from my laptop to the server or on the local Solarwinds server.

 

    I can make a local Orion account and I can connect through SWQL. I can't get an AD account to connect to the main Solarwinds server through SWQL Studio.

 

    if you had this problem before let me know? 

 

 

The following are the Solarwinds products.

Orion 2015.2, NCM 7.4, SAM 6.2.1, NPM 11.5.2, IVIM 2.1.0, and DPA 9.2.0

 

The version of SWQL studio is 1.10.16.0


REST API returning 403 Forbidden for Admin user

$
0
0

I am currently using the SolarWinds rest API to extract Node information and all sorts of other data from the database. My scripts have been working fine until recently when I'm now receiving a 403 Forbidden message response from the server. The credentials I'm using are my admin credentials which I use for both the REST API as well as logging into the SW web UI. I've verified that my user credentials are fully equipped with admin rights across the board.

 

Does anyone know why I would all of a sudden have 403 forbidden responses for my REST API interfaces.  I can login to the web UI with no problems at all. I'm assuming it's a security thing for REST API but I don't know what would have changed. Thanks in advance.

Todd

 

Request:

GET https://localhost:17778/SolarWinds/InformationService/v3/Json/Query?query=select%2Bnodeid%2Bfrom%2Borion.NodesCustomProperties HTTP/1.1

Accept-Encoding: gzip,deflate

Host: localhost:17778

Connection: Keep-Alive

User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

Authorization: Basic RnJhbmsuSGFuc2VuQGJsYWNrdksYmF1ZDpCbEBja2JhdWQx

 

Response:

HTTP/1.1 403 Forbidden

Content-Length: 0

Server: Microsoft-HTTPAPI/2.0

Date: Mon, 17 Aug 2015 16:58:01 GMT

Swql studio connection problem

$
0
0

I been trying to connect to my main Solarwinds server with the swql studio. I setup an individual windows account in Solarwinds with my company’s AD. I keep getting a connection error unable to connect to information service. An error occurred when verifying for the message. I checked and stopped and restated the Solarwinds information service and Solarwinds information service 3.  It still will not connect from my laptop to the server or on the local Solarwinds server.

 

Anyone have this problem before or was able to fix it?

Updating Monitored Interfaces on a Node

$
0
0

I'm trying to put a query together to find "unmonitored" UP interfaces on Nodes in my environment (so I can monitor them) and then (I want to DeSelect DOWN monitored interfaces); my environment is very fluid and generally I'm adding a "removing" interfaces on a constant basis (Lab/POC environment).

 

I'm using the OrionSDK app and have queried Orion.UDT.Ports where NodeID = 'One of My Nodes' but the isMonitored (boolean) Column is not accurate based on what I see from the "list resources" in the Web GUI..

 

From the Web Interface, I can Navigate to Nodes, select the Node that I want to "List Resources" for and then after the device is queried I can then Select/Deselect Interfaces I want to monitor statistics for..

 

I'm running NPM 11.5.1

AddNodeToNCM fails via PowerShell

$
0
0

Is there a compatibility issue with our setup of NPM/NCM, and the SDK? 

 

I am trying to add devices to NCM that are already in NPM.  Using the blog entry titled 'PowerShell script that exports Nodes from NPM and imports them into NCM (for Core 2012.1 and after - NPM 10.3 and after)' which provides a framework script - URL https://thwack.solarwinds.com/docs/DOC-167332

 

The script fails to add the NCM portion ( AddNodeToNCM )

    Invoke-SwisVerb $target Cirrus.Nodes AddNodeToNCM $newNode.NodeID gives a 'Cannot find assembly' error

 

Our environment is setup with NCM 7.2.11, NPM 10.6.3 and SDK 1.7.89

Source and target are the same ( target = Connect-Swis -Certificate )

 

Brief PowerShell output:

PS C:\Monadmin\scripts> $newNode.NodeID

13144

PS C:\Monadmin\scripts> $target

OperationTimeout              Channel                       ClientChannel                 ChannelFactory

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

01:00:00                      SolarWinds.InformationServ... SolarWinds.InformationServ... System.ServiceModel.Channe...

PS C:\Monadmin\scripts> Invoke-SwisVerb $target Cirrus.Nodes AddNodeToNCM "$newNode.NodeID"

Invoke-SwisVerb : Verb Cirrus.Nodes.AddNodeToNCM: Cannot find assembly

At line:1 char:16

+ Invoke-SwisVerb <<<<  $target Cirrus.Nodes AddNodeToNCM "$newNode.NodeID"

    + CategoryInfo          : InvalidOperation: (:) [Invoke-SwisVerb], FaultException`1

    + FullyQualifiedErrorId : SwisError,SwisPowerShell.InvokeSwisVerb

curl, invoke with parameter

$
0
0

I'm trying to do preliminary research on leveraging the Json endpoint before I begin coding an integration in java.  I can send GET requests successfully to the endpoint, but I'm having trouble using the post method.

 

When invoking the DiscoverInterfacesOnNode verb using the following curl request

 

curl -k --tlsv1.0 -v -u user:xxxxxx -H "Content-Type: application/json" -X POST "https://lfkntxxnds/InformationService/v3/Json/Invoke/Orion.NPM.Interfaces.DiscoverInterfacesOnNode" -d "["1100"]"

 

I get this error. (in bold below):

Incidentally, this is an example I saw in thwact.  I would expect to post a name:value, but I've tried numerous iterations with no success.

 

*   Trying 10.96.254.212...

* Connected to lfkntxxa-opm (10.96.254.212) port 17778 (#0)

* TLS 1.0 connection using TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA

* Server certificate: SolarWinds-Orion

* Server auth using Basic with user 'swapiuser'

> POST /SolarWinds/InformationService/v3/Json/Invoke/Orion.NPM.Interfaces.DiscoverInterfacesOnNode HTTP/1.1

> Host: lfkntxxa-opm:17778

> Authorization: Basic c3dhcGl1c2VyOnN3NHAxdXMzcg==

> User-Agent: curl/7.43.0

> Accept: */*

> Content-Type: application/json

> Content-Length: 6

>

* upload completely sent off: 6 out of 6 bytes

< HTTP/1.1 500 Internal Server Error

< Content-Length: 78

< Content-Type: application/json

< Server: Microsoft-HTTPAPI/2.0

< Date: Mon, 03 Aug 2015 15:18:51 GMT

<

* Connection #0 to host lfkntxxa-opm left intact

"Expecting state 'Element'.. Encountered 'Text'  with name '', namespace ''.

REST API help

$
0
0

I have been able to create a couple functions in Powershell to do some tasks like change a custom variable and a couple other things. My question is, how do you know what verbs are available to use in the URI?

 

This will query and return some things I wanted to know about a node. I understand the query part pretty well, but have issues with the other commands.

 

Invoke-RestMethod -Uri ("https://"+$Hostname+":17778/SolarWinds/InformationService/v3/Json/Query?query=

    SELECT Nodes.NodeID, Nodes.Uri, Nodes.Caption, NodesCustomProperties.Service_State_Notification, NodesCustomProperties.Application

    FROM Orion.Nodes

    Join Orion.NodesCustomProperties

    On Nodes.NodeID=NodesCustomProperties.NodeID") `

    -Credential $orioncred -ContentType "application/json"


So to create a node you use something like this

 

Invoke-RestMethod -Uri ('https://192.168.56.15:17778/SolarWinds/InformationService/v3/Json/Create/Orion.Nodes') `

-Credential  $orioncred  -ContentType "application/json" -Method POST -Body ($newnode) -Verbose

 

It took me a while to figure out you had to CREATE  and I only found this by hunting down examples. Is there a resource that gives me a more in depth overview of the different functions/commands to send in REST?

 

I figured this one out by reading through the SDK help files. It deletes a node, and I understand it because it uses a -Method Delete.

 

Invoke-RestMethod -Uri ("https://"+$Hostname+":17778/SolarWinds/InformationService/v3/Json/"+$Swis) `

                              -Credential  $orioncred -ContentType "application/json" -Method Delete

 

So how do I find out how to do all of the amazing things you can do with the REST method? We don't want to use the built in PS module. Any help is appreciated.

Orion SDK with PowerShell - manage/unmanage multiple nodes

$
0
0

I've been able to script unmanaging and managing nodes in powershell. However, for 400+ nodes, this ends up taking quite a while. Via script, it takes about 7 minutes to unmanage the nodes and over 10 minutes to remanage them. Doing this from the website takes about 25 seconds and no more than a minute, respectively. My guess is that the website somehow group updates the database instead of doing it one at a time. Anyone else seen this or have any idea how to do more than one node at a time? Below is sample code for how I am unmanaging a single node:

 

Invoke-SwisVerb $swis Orion.Nodes Unmanage @("N:$nodeid",$start,$end,"false")

 

Thanks for any advice you have!


REST API returning 403 Forbidden for Admin user

$
0
0

I am currently using the SolarWinds rest API to extract Node information and all sorts of other data from the database. My scripts have been working fine until recently when I'm now receiving a 403 Forbidden message response from the server. The credentials I'm using are my admin credentials which I use for both the REST API as well as logging into the SW web UI. I've verified that my user credentials are fully equipped with admin rights across the board.

 

Does anyone know why I would all of a sudden have 403 forbidden responses for my REST API interfaces.  I can login to the web UI with no problems at all. I'm assuming it's a security thing for REST API but I don't know what would have changed. Thanks in advance.

Todd

 

Request:

GET https://localhost:17778/SolarWinds/InformationService/v3/Json/Query?query=select%2Bnodeid%2Bfrom%2Borion.NodesCustomProperties HTTP/1.1

Accept-Encoding: gzip,deflate

Host: localhost:17778

Connection: Keep-Alive

User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

Authorization: Basic RnJhbmsuSGFuc2VuQGJsYWNrdksYmF1ZDpCbEBja2JhdWQx

 

Response:

HTTP/1.1 403 Forbidden

Content-Length: 0

Server: Microsoft-HTTPAPI/2.0

Date: Mon, 17 Aug 2015 16:58:01 GMT

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

$
0
0

First, I'll share the script. Then, I'll explain why we need it and how it helps us in our environment.

To use the script you must have the Orion SDK installed on the monitored node.

 

Take the text below, paste in Powershell ISE and save it as a PS1.

------------------------------------ Start PS1 -----------------------------------------------------------------

 

# 2014-07-21 Node Unmanage script for SolarWinds SDK Powershell

# by Joe Dissmeyer | Thwack - @JoeDissmeyer | Twitter - @JoeDissmeyer | www.joedissmeyer.com

# This script will unmanage a single node in the Orion database. First, it finds the node number in the Orion database, then it will unmanage it for 99 years.

# This script assumes you are running it LOCALLY from an already managed node AND that the machine has the Orion SDK v1.9 installed on it.

# If the machine is not already managed in SolarWinds this script will fail without warning.

# Replace ORIONSERVERNAME with the appropriate values.

# ORIONSERVERNAME = Your Orion poller instance. (Ex. 'SOLARWINDS01.DOMAIN.LOCAL'). Single quotes are important.

 

# Load the SolarWinds Powershell snapin. Needed in order to execute the script. Requires the Orion SDK 1.9 installed on the machine this script is running from.

Add-PSSnapin SwisSnapin

 

 

# SolarWinds user name and password section. Create an Orion local account that only has node management rights. Enter the user name and password here.

$username = "SWnodemanagement"

$password = "MyP@44w0$d"

 

# This section allows the password to be embedded in this script. Without it the script will not work.

$secstr = New-Object -TypeName System.Security.SecureString

$password .ToCharArray() | ForEach-Object {$secstr.AppendChar($_)}

$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username,$secstr

 

# The actual job

$ORIONSERVERNAME = 'SWServer1.domain.local'

$nodename = $env:COMPUTERNAME

 

$swis = Connect-Swis -Credential $cred -host $orionservername

$nodeid = Get-SwisData $swis "SELECT NodeID FROM Orion.Nodes WHERE SysName LIKE '$nodename%'"

$now =[DateTime ]:: Now

$later =$now.AddYears(99)

Invoke-SwisVerb $swis Orion.Nodes Unmanage @("N: $nodeid ", $now ,$later , "false")

 

------------------------------------ End PS1 -----------------------------------------------------------------

 

 

 

And now the Remanage script. Again, save as a .PS1 file.

------------------------------------ Start PS1 -----------------------------------------------------------------

 

# 2014-07-21 Node Remanage script for SolarWinds SDK Powershell

# by Joe Dissmeyer | Thwack - @JoeDissmeyer | Twitter - @JoeDissmeyer | www.joedissmeyer.com

# This script will remanage a single node in the Orion database.

# This script assumes you are running it LOCALLY from an already managed node AND that the machine has the Orion SDK v1.9 installed on it.

# If the machine is not already managed in SolarWinds this script will fail without warning.

# Replace ORIONSERVERNAME with the appropriate values.

# ORIONSERVERNAME = Your Orion poller instance. (Ex. 'SOLARWINDS01.DOMAIN.LOCAL'). Single quotes are important.

 

 

# Load the SolarWinds Powershell snapin. Needed in order to execute the script. Requires the Orion SDK 1.9 installed on the machine this script is running from.

Add-PSSnapin SwisSnapin

 

 

# SolarWinds user name and password section. Create an Orion local account that only has node management rights. Enter the user name and password here.

$username = "SWnodemanagement"

$password = "MyP@44w0%d"

 

 

# This section allows the password to be embedded in this script. Without it the script will not work.

$secstr = New-Object -TypeName System.Security.SecureString

$password .ToCharArray() | ForEach-Object {$secstr.AppendChar($_)}

$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username,$secstr

 

 

# The actual job

$ORIONSERVERNAME = 'SWServer1.domain.local'

$nodename = $env:COMPUTERNAME

 

 

$swis = Connect-Swis -Credential $cred -host $orionservername

$nodeid = Get-SwisData $swis "SELECT NodeID FROM Orion.Nodes WHERE SysName LIKE '$nodename%'"

$now =[DateTime ]:: Now

$later =$now.AddYears(99)

Invoke-SwisVerb $swis Orion.Nodes Remanage @("N: $nodeid ", $now ,$later , "false")

 

------------------------------------ End PS1 -----------------------------------------------------------------

 

Explanation:

My company had a very unique need to monitor our enterprise Windows application that runs not only on standard desktop PCs, but also runs on mobile tablets connected to WiFi access points. These tablets run the standard Windows 7 Professional OS so it makes it easy to set up application monitoring in SolarWinds SAM for these machines. However, the problem comes at the end of the day when these tablets are turned off and placed in their charging docks for the night. As you can imagine, this creates an administrative nightmare (not to mention an email alert flood) in SolarWinds when this happens.

 

SolarWinds Orion NPM and SAM is designed to always keep an eye on a node or application that is entered in it's database. It is not designed to monitor an application or node only "part of the time" --- well, at least it isn't designed for this purpose out of the box. So instead, we have to create a workaround that will suit our needs. What we needed to do was figure out how to automatically "unmanage" these Windows tablet PCs in SolarWinds when they are shut down for the night, but also automatically "re-manage" them once they boot up. This is where the script comes into play.

 

The idea is to take the Unmanage script and apply it as a shut down script in Group Policy, then take the Remanage script and apply it as a boot up script in Group Policy.

Here is why this works for us:

The business is supposed to gracefully shut down the tablet by clicking Start > Shut down. If not, then an email alert triggers that informs us that the application is down on the machine.

If the tablet goes offline in the middle of the day for any reason, we will receive an email alert about that node.

When the machine is shut down properly, the node is automatically unmanaged in SolarWinds.

When the machine boots up and someone logs into the machine, the node is automatically remanaged in SolarWinds.

 

But here is an even better use for these scripts --- Scheduled Server Maintenance! How many times have we, server administrators, had to patch Windows Servers during scheduled maintenance hours? Normally you would have to go into SolarWinds and unmanage the node first BEFORE rebooting as not to trigger an email alert. Well with these scripts you wouldn't have to worry about that as much since this would be automatic.

 

Final notes:

Of course, this is just one way to go about auto-managing nodes in SolarWinds. There are some alternatives to doing this using the Orion SDK and Powershell which is to, instead, use the built-in .NET properties in Powershell 2.0 to access the Orion SQL database directly, find the node ID, and unmanage it in that manner. For those that are interested in how do to this without the Orion SDK, let me know and I'd be happy to elaborate.

Swis Verb for DHCP

$
0
0

I need to update several hundred Citrix Hosts to check the DHCP box under host properties. I can't find a Swis verb that will let me update the "DynamicIP" field in the Orion.Nodes table. I was looking at Set-SwisObject but it appears that is only for Custom Properties. Please point me in the right direction.

SWQL query timeout

$
0
0

How to increase timeout with error?

Thanks

 

Capture.PNG

Does the SDK provide c# based APIs for performing 'unmanage' operations on target nodes to suspend alerting?

$
0
0

Does the SDK provide c# based APIs for performing 'unmanage' operations on target nodes to suspend alerting?

 

My team has a tool that we used to suspend monitoring operations on several services from a unified UI.

 

The tool is written in C# and we are looking to incorporate SolarWinds as one of the services you can opt to suspend monitoring for when performing maintenance activates like patching.

 

I was give a pretty good and simple example of how to use the SDK with powershell to perform and 'unmanage' operation on a set of nodes. However, this is very award to incorporate into our c# app. We either have create process windows and pipe command line calls to it, or try to access the object defined in the powershell assembly directly which I have not gotten to work yet.

 

Additionally it appears that the powershell processes do not support windows authentication, which is something we would like to support so we can manage access via account group.

 

Does anyone have examples of accessing the SolarWinds service directly from c# and executing an unmanage operation?

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.


Hi, I was wondering if the SDK provides functionality to automate file transfers via the Solarwinds SFTP product?

$
0
0

Hi, I was wondering if the SDK provides functionality to automate file transfers via the Solarwinds SFTP product?


Node Creation Error

$
0
0

After upgrading Solarwinds to the latest stable version (SUM 6.2, and NPM 11.5) we are unable to create a new node using the the SDK with version 1.10.16.

 

Please find below the error stack trace:

 

AxisFault

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client

faultSubcode:

faultString: Create failed, check fault information.

faultActor:

faultNode:

faultDetail:

{http://schemas.solarwinds.com/2007/08/informationservice}InformationServiceFaultContract:<Message>Operation not implemented for entities mapped to multiple storages.</Message>

 

Create failed, check fault information.

 

Best Regards,

SolarWinds to Service-Now Integration

$
0
0

SolarWinds & Service-Now

=====================

We’re trying to do the following (option 1 is our preferred while option 2 is a fallback):

1)

A) SolarWinds generates alert

B) SolarWinds uses a “webservice/api/sdk/other tool” to “communicate with/connect to” with the appropriate information so ServiceNow can open a ticket with the appropriate categorization, priority, whether it is internally or externally managed (ticket assignment changes depending), etc.

C) ServiceNow will communicate to the “response team” that there is a new ticket that must be addressed

D) ServiceNow will “communicate with/connect to” SolarWinds to acknowledge the alert and to record the ServiceNow ticket in to the acknowledgement notes

E) SolarWinds will register alert and set alert to acknowledged status and will include the ServiceNow ticket number

*END*

 

2)

A) SolarWinds generates alert

B) SolarWinds sends email notification to ServiceNow – email will need to be in appropriate form to be “absorbed”

C) ServiceNow “absorbs” email and generates a ticket with the appropriate categorization, priority, whether it is internally or externally managed (ticket assignment changes depending), etc.

D) ServiceNow “responds” to email with acknowledgement and ticket number

E) SolarWinds registers the response and sets the alert to acknowledged status and will include the ServiceNow ticket number

*END*

 

At this time, we’re looking for foundational materials to help us get started and determine the easiest/best way to perform one of these options and we’re hoping SolarWinds support can give us some pointers on where to researching documentation and what documentation may exist. Our hope is this is a relatively straight forward activity since it seems like it would be fairly standard that companies would want their monitoring and ticketing systems to interact. We have been rather ineffectually researching SolarWinds documentation and Thwack for roughly a week and have been unable to find the “start here” materials. We understand that the referenced SDK is not supported and we will have to use Thwack as support, however, at this point, we don’t have enough information to understand whether the SDK is our best/only option. We see in the release notes that there is the VBClient, etc. however it is unclear if this is the proscribed technique or just *A* technique.

 

Thanks in advance for your feedback and guidance!

import some external database data

$
0
0

how to import some external database data to my npm devices using NPM SDK?

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?

Orion SDK with PowerShell - manage/unmanage multiple nodes

$
0
0

I've been able to script unmanaging and managing nodes in powershell. However, for 400+ nodes, this ends up taking quite a while. Via script, it takes about 7 minutes to unmanage the nodes and over 10 minutes to remanage them. Doing this from the website takes about 25 seconds and no more than a minute, respectively. My guess is that the website somehow group updates the database instead of doing it one at a time. Anyone else seen this or have any idea how to do more than one node at a time? Below is sample code for how I am unmanaging a single node:

 

Invoke-SwisVerb $swis Orion.Nodes Unmanage @("N:$nodeid",$start,$end,"false")

 

Thanks for any advice you have!

Viewing all 3719 articles
Browse latest View live


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