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

Using the SDK powershell snap in - some newbie questions

$
0
0

Hi all,

Just getting started doing an integration between Orion and some of our other tools. Have been through the SDK 1.3 and found some useful stuff in there especially around the kind of things we're looking to do like:

- create/remove a new node

- Add pollers

- Get a list of nodes

 

So I have some questions and please excuse me if these are trivial, but I think it's important we get this right at the outset. To set the scene my plan is to use the powershell cmdlets to do my integrations. So to the questions:

1. The Connect-Swis cmdlet - can it take the user/pw as parameters? If so how? eg:

     $swis = Connect-Swis -user myuser -pw mypassword

 

2. To create a node, i can use the New-SwisObject cmdlet. There are basically 2 instances where I'd want to do this: creating a server or a network device like a switch etc. In either case, is it necessary to add one or more interfaces for that Orion.Node object or will Orion discover the interfaces when it polls it and add them itself?

3. Follow on from Q2 - can I force Orion to poll the device once I've added it?

4. Is it always necessary to use the NodeID when querying for a Orion.Node object? I've tried to use a select statement to do a query using "where Caption='myhost'" but it doesn't seem to like that.


Trying to create groups (containers) using perl

$
0
0

Hello !

 

I'm trying to create groups, using perl, but I can't figure out how to send the group members definition (in a xml format).

I only get the message : "Verb Orion.Container.CreateContainer cannot unpackage parameter 6".

 

SDK 1.5 with the patched InformationService.pm for the Invoke method.

 

Thanks.

 

 

orion_sdk perl

SDK Applicability

$
0
0

This Technical Reference explains what SDK functionalities are available by SolarWinds product.

Trying to create a new view type

$
0
0

So I've been working on trying to integrate my NOC view (http://thwack.solarwinds.com/docs/DOC-157771) into Orion itself, rather than have it as a isolated web application.

 

Has anyone been able to successfully create what in effect would be a whole new module for Orion? My attempts to take NPM, APM, and NCM directory and file structures and manipulate them to fit my project have come up empty. At best, I crash Orion when I put the folder structure in place, otherwise nothing happens...

 

Any tips, suggestions, pointer, aids, how to's, etc. out there?

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!

Using the SDK powershell snap in - some newbie questions

$
0
0

Hi all,

Just getting started doing an integration between Orion and some of our other tools. Have been through the SDK 1.3 and found some useful stuff in there especially around the kind of things we're looking to do like:

- create/remove a new node

- Add pollers

- Get a list of nodes

 

So I have some questions and please excuse me if these are trivial, but I think it's important we get this right at the outset. To set the scene my plan is to use the powershell cmdlets to do my integrations. So to the questions:

1. The Connect-Swis cmdlet - can it take the user/pw as parameters? If so how? eg:

     $swis = Connect-Swis -user myuser -pw mypassword

 

2. To create a node, i can use the New-SwisObject cmdlet. There are basically 2 instances where I'd want to do this: creating a server or a network device like a switch etc. In either case, is it necessary to add one or more interfaces for that Orion.Node object or will Orion discover the interfaces when it polls it and add them itself?

3. Follow on from Q2 - can I force Orion to poll the device once I've added it?

4. Is it always necessary to use the NodeID when querying for a Orion.Node object? I've tried to use a select statement to do a query using "where Caption='myhost'" but it doesn't seem to like that.

PowerShell Script to Unmanage Hosts Connection Problems

$
0
0

Using SDK version 1.5 with NPM 10.2.2

 

It seems I'm having problems connecting to my Solarwinds server using SDK. I
try "$swis = Connect-Swis -host 'solarwindsserver.domain.com'" I get
prompted for a user name and password but it doesn't seem to matter what I
enter being it always seems to work. I then try "Get-SwisData $swis
'SELECT NodeID, Caption FROM Orion.Nodes'" to see if I can read the
database but get the below error in PowerShell]

 

 

Get-SwisData : There was no endpoint listening at
net.tcp://nau-mon01.naucom.com:17777/SolarWinds/InformationService/v3

 

 

/Orion/ssl that could accept the message. This is often caused by an
incorrect address or SOAP action. See InnerExcepti

 

 

on, if present, for more details.

 

 

At line:1 char:13

 

 

+ Get-SwisData <<<< $swis 'SELECT NodeID, Caption FROM
Orion.Nodes'

 

 

+ CategoryInfo : NotSpecified: (:) [Get-SwisData], EndpointNotFoundException

 

 

+ FullyQualifiedErrorId :
System.ServiceModel.EndpointNotFoundException,SwisPowerShell.GetSwisData

 

 

I found this post http://thwack.solarwinds.com/thread/46537
suggesting that the query may be returning too many results but adding a where
clause "Get-SwisData $swis 'SELECT NodeID FROM Orion.Nodes WHERE SysName
like somenode'" produces the following error leading me to believe the
thread isn't related to my problem

 

 

Get-SwisData : There was no endpoint listening at
net.tcp://nau-mon01.naucom.com:17777/SolarWinds/InformationService/v3

 

 

/Orion/ssl that could accept the message. This is often caused by an
incorrect address or SOAP action. See InnerExcepti

 

 

on, if present, for more details.

 

 

At line:1 char:13

 

 

+ Get-SwisData <<<< $swis 'SELECT NodeID, Caption FROM
Orion.Nodes WHERE SysName like nau-mon1'

 

 

+ CategoryInfo : NotSpecified: (:) [Get-SwisData], EndpointNotFoundException

 

 

+ FullyQualifiedErrorId :
System.ServiceModel.EndpointNotFoundException,SwisPowerShell.GetSwisData

 

 

I am able to use SWQL Studio connecting with Server Type "Orion (v2)
AD" and I'm able to run queries. This leads me to believe "$swis =
Connect-Swis -host 'solarwindsserver.domain.com'" needs something to tell
it to connect using "Orion (v2) AD" but there doesn't seem to be an
option from looking at "Orion SDK.pdf".

 

 

I try "$swis = Connect-Swis -v2 -host 'solarwindsserver.domain.com'" and get the following error when running
"Get-SwisData $swis 'SELECT NodeID, Caption FROM Orion.Node WHERE
SysName=nau-mon01.naucom.com'"

 

 

Get-SwisData : Invalid username or password.

 

 

At line:1 char:13

 

 

+ Get-SwisData <<<< $swis 'SELECT NodeID, Caption FROM
Orion.Node WHERE SysName=nau-mon01.naucom.com'

 

 

+ CategoryInfo : InvalidOperation: (:) [Get-SwisData],
MessageSecurityException

 

 

+ FullyQualifiedErrorId : SwisError,SwisPowerShell.GetSwisData

 

 

When using the same user name and password I use for SWQL Studio

Trying to create groups (containers) using perl

$
0
0

Hello !

 

I'm trying to create groups, using perl, but I can't figure out how to send the group members definition (in a xml format).

I only get the message : "Verb Orion.Container.CreateContainer cannot unpackage parameter 6".

 

SDK 1.5 with the patched InformationService.pm for the Invoke method.

 

Thanks.

 

 

orion_sdk perl


Adding node to a container (group) with Perl?

$
0
0

I'm attempting to add a specific nodeID to a container using the Perl SDK.

 

None of the following seem to be working... I must be missing something obvious!

 

my %UPDATEGROUP = (

   'ContainerID' => $_[1],

  'MemberPrimaryID' => $_[2]

  );

 

my $swis = SW::InformationService->new();

$swis->outputxml("true");

$swis->proxy("https://".$hostname.$endpoint);

$swis->proxy->http_request->authorization_basic($username, $password);

 

return $swis->Create('Orion.Container', \%UPDATEGROUP);

 

..or

 

return $swis->Create('Orion.ContainerMembers', \%UPDATEGROUP)

 

Any help / guidance woudl be very much appreciated.

 

Thanks,

 

Graeme

Solarwinds Information Service - Enable for External API Access

$
0
0

I've recently installed the Orion SDK and I want to be able to use the SWIS from various machines on our network.

 

I think I need to change the config file so the tcp service on 17777 isn't bound to only localhost any more (hence enabling remote access) but I can't find any documentation on how to do it in the latest NPM/APM version (APMv5??). I found this old knowledgebase link but does anyone have anything more up to date?

 

http://knowledgebase.solarwinds.com/kb/questions/1992/How+to+change+the+host+name+used+by+the+Orion+SDK+to+connect+to+the+SolarWinds+Information+Service+%28SWIS%29

 

Thanks,

 

Henri

Is it possible to use Orion.UDT.Port AdministrativeShutdown?

$
0
0

I'm a little new to the SDK, and with the new Shutdown and Enable buttons in the web console of UDT, I was trying to us PoSH to shut down an interface.

 

The meat and potatoes of the script looks like this:

$nodeid = 137

$port = 1169

Invoke-SwisVerb $swis Orion.UDT.Port AdministrativeShutdown @("N:$node","UP:$port")

 

Is it possible to use the SDK for this action? How far off am I?

 

I've tried a couple methods that seem like they should work, but I'm stuck at this... This is the error I'm getting now:

Invoke-SwisVerb : Verb Orion.UDT.Port.AdministrativeShutdown: Cannot find assembly

At C:\Users\alagrone\Desktop\Basic AdShut.ps1:15 char:16

+ Invoke-SwisVerb <<<<  $swis Orion.UDT.Port AdministrativeShutdown @("N:$node","UP:$port")

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

    + FullyQualifiedErrorId : SwisError,SwisPowerShell.InvokeSwisVerb

 

 

or, with this modification:

if (! (Get-PSSnapin | where {$_.Name -eq "SwisSnapin"})) {

    Add-PSSnapin "SwisSnapin"

}

 

#Connect to Swis

#$hostname = "localhost"

#$cred = New-Object -typename System.Management.Automation.PSCredential -argumentlist $username, $password

$swis = Connect-Swis -v2 -Trusted #-Hostname 'localhost'

#$nodeid = 137

$portids = 1169

 

#Get-SwisData $swis "SELECT NodeID FROM Orion.UDT.Port WHERE PortID=@portids" @{portids=$portids}

#Get-SwisData $swis "SELECT PortID FROM Orion.UDT.Port WHERE PortID=@portids" @{portids=$portids}

 

$node= Get-SwisData $swis "SELECT NodeID FROM Orion.UDT.Port WHERE PortID=@portids" @{portids=$portids}

$port= Get-SwisData $swis "SELECT PortID FROM Orion.UDT.Port WHERE PortID=@portids" @{portids=$portids}

 

Invoke-SwisVerb $swis Orion.UDT.Port AdministrativeShutdown @("$node","$port")

 

I get:

Invoke-SwisVerb : Verb Orion.UDT.Port.AdministrativeShutdown cannot unpackage parameter 1

At C:\Users\alagrone\Desktop\Basic COnnect.ps1:18 char:16

+ Invoke-SwisVerb <<<<  $swis Orion.UDT.Port AdministrativeShutdown @("$node","$port")

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

    + FullyQualifiedErrorId : SwisError,SwisPowerShell.InvokeSwisVerb

Need Help Converting SQL Report Writer Code to SWQL - Down Time Duration

$
0
0

Here is Report Writer SQL code that produces the duration of down time for a node.  I need to be able to convert this to SWQL and populate the 'hours down' time into a custom property field.  I want to use the 'hours down' time custom property field in conjunction with changing Google map Icon colors once time frame meets specified thresholds.   I'm not very savvy with SQL or coding so all suggestions are welcome.  Thanks everyone.  

 

SELECT     DATEDIFF(hh, T1.DownTime, CURRENT_TIMESTAMP) AS HoursDown, Nodes.Caption, Nodes.IP_Address,

T1.DownTime, Nodes.NodeID

FROM         (SELECT     MAX(EventTime) AS DownTime, NetObjectID, NetworkNode

                       FROM          Events

                       WHERE      (EventType = 1) AND (NetObjectType = 'N')

                       GROUP BY NetObjectID, NetworkNode) AS T1 INNER JOIN

                      Nodes ON T1.NetworkNode = Nodes.NodeID

WHERE     (Nodes.Status = '2') AND (Nodes.Owner = 'RHD')

ORDER BY HoursDown DESC, Nodes.Caption, T1.DownTime DESC, Nodes.NodeID

 

Output from this Query:

HoursDownNodeIP AddressDownTimeNode ID
139rtr.316864.ph.us.tgr.net10.165.4.111/2/2012 14:1818188
131rt2.023675.ph.us.tgr.net10.180.119.211/2/2012 22:1316384
120rt2.013146.ph.us.tgr.net10.81.4.211/3/2012 9:5615487
63rt2.013426.ph.us.tgr.net10.250.112.211/5/2012 18:1315560
42rtr.023040.ph.us.tgr.net10.80.164.111/6/2012 15:4816194
41rt2.012626.ph.us.tgr.net10.81.76.211/6/2012 16:5515348
39rt2.013236.ph.us.tgr.net10.7.34.211/6/2012 18:2215534
39rtr.023016.ph.us.tgr.net10.80.141.111/6/2012 18:0116174
36rt2.008384.ph.us.tgr.net10.74.64.211/6/2012 21:1314776
24rt2.026530.ph.us.tgr.net10.76.43.211/7/2012 9:4617140
17rt2.013122.ph.us.tgr.net10.81.94.211/7/2012 16:1115475
17rt2.013139.ph.us.tgr.net10.81.103.211/7/2012 16:1815484
16rtr.012934.ph.us.tgr.net10.82.80.111/7/2012 17:4815429
15rt2.006231.ph.us.tgr.net10.13.12.211/7/2012 18:2814567

Nodes custom property from SDK

$
0
0

I am using the Orion SDK to query the Orion Database. I would like the read some of the custom properties of the Nodes in the network using the SDK. The problem is i can't find a way to get the custom property value from the Database schema. In the Nodes table the CustomProperties property just take me to another table which doesn't seem to have any valuable information. I checked Orion.CustomProperty and it shows all the custom properties in the system, but still can't find a way to connect it to a node.

 

 

I would really appreciate any help on this.

 

Regards

Alberto García

 

Extracting Data from Orion database

$
0
0

Hello Experts,

 

I am new to solarwinds. I am in a situation where I need to extract data from Orion database. Basically I have been provided with orion SDK Software to access Orion database.

 

I can login to the database and it has tables inside.

 

Does anyone know how to extract data from them? Do we have any document which explains it?

 

Thanks,

 

-Prashant Girennavar.

API Authentication - Current logged on user

$
0
0

Thought i would pass this along,

 

In writing a maintenance tool for my organization, you have to be able to get to either A.  Get the users credentials and store them somewhere so they can be passed to the web service B. Pass the current users credentials to the web service.  Else, all Unmanage and Manage calls to the API would be by the user hard coded into your function which isn't good when you want some auditing of who it doing what.

 

My first route, was to get the credentials and encrypt the password into the registry, decrypt when needed then wipe the contents of the clear text pass out of memory.. which was successful and secure but there was always that blink of a second the password was in clear text format and i just didn't like it.  So i set off the find a way to pass in the users credentials, and i was successful in the task and thought I'd pass along to the community how to do so.  If someone knows where this exists in documentation, please point it out to me because i couldn't find it. I only saw examples of supplying a username and password to the webservice

 

 

Function GetSwisClient(Optional ByVal host As String = "localhost") As InformationServiceClient

 

Dim address As String = String.Format("https://{0}:17778/SolarWinds/InformationService/OrionBasic", host)

GetSwisClient = New InformationServiceClient("BasicHttpBinding_InformationService", address)

GetSwisClient.ClientCredentials.HttpDigest.AllowedImpersonationLevel = Security.Principal.TokenImpersonationLevel.Delegation

GetSwisClient.ClientCredentials.HttpDigest.ClientCredential = System.Net.CredentialCache.DefaultCredentials

GetSwisClient.ClientCredentials.UserName.UserName = My.User.Name.ToString

 

End Function

 

Message was edited by: Charles Russell Corrected the code.


Trying to get some information for Perl API for Orion

$
0
0

Hi,

Where can I get the perdoc for the perl api? Want to know the commands that can be invoked.All I have is the PM.

 

I was able to get a small program to run basic queries but whenever I tried the below line, it will give me the following error

$swis->proxy->ssl_opts(verify_hostname => 0);

Can't locate object method "ssl_opts" via package "SOAP::Transport::HTTP::Client" at sample.pl line 13.

 

I have Soap::Lite and all its prereq installed (ver 0.714). Perl 5.10. But it lets me comment the ssl verification and works without it. Still wondering why it would give that error. BTW, I got the latest PM file from one of the posts in here, so I think I have the right API.

Using Powershell to add nodes with Custom Properties for Device Type

$
0
0

Hello,
Running Orion NPM 10.6.0 and SDK 1.7 on Win2k8R2

 

Can anyone help with adding devices into Orion using Powershell?

 

To complete via NPM Web console, select Management, Edit Node.
Select groups, break down the group to a specific node.
Choose node properties, then edit node.
Custom properties show Device_Type:

12-4-2013 3-35-46 PM.png

 

Sample script adding a server fails for the custom properties:
---------------

Add-PSSnapin SwisSnapin

# initialize SWIS connection
$swis = Connect-Swis -Certificate

# add a node
$newNodeProps = @
{
EntityType="Orion.NodesCustomProperties";
DisplayName="servername_here";
Device_Type="Server_Windows";
}

$newNodeUri = New-SwisObject $swis –EntityType "Orion.NodesCustomProperties" –Properties $newNodeProps

$nodeProps = Get-SwisObject $swis -Uri $newNodeUri Orion.Nodes

Output:
PS C:\> $newNodeUri = New-SwisObject $swis -EntityType "Orion.NodesCustomProperties" -Properties $newNodeProps
New-SwisObject : Cannot bind argument to parameter 'Properties' because it is null.
At line:1 char:89
+ $newNodeUri = New-SwisObject $swis -EntityType "Orion.NodesCustomProperties" -Properties <<<<  $newNodeProps
    + CategoryInfo          : InvalidData: (:) [New-SwisObject], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,SwisPowerShell.NewSwisObject

PS C:\>


Similar blog = http://thwack.solarwinds.com/message/163190#163190

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!

Trying to create groups (containers) using perl

$
0
0

Hello !

 

I'm trying to create groups, using perl, but I can't figure out how to send the group members definition (in a xml format).

I only get the message : "Verb Orion.Container.CreateContainer cannot unpackage parameter 6".

 

SDK 1.5 with the patched InformationService.pm for the Invoke method.

 

Thanks.

 

 

orion_sdk perl

Custom Poller Assignment

$
0
0

How is the CustomPollerAssignmentID generated?

~Ed

Viewing all 3719 articles
Browse latest View live


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