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

Queries regarding Orion SDK

$
0
0

Hi,

 

I am a newbie to Orion SDK . we actually want to implement/deploy SDK in our production environment. I had some queries..maybe some one can help me out..:

- we are running NPM v10.3 and soon gonna be using Orion FoE(Failover engine),I hope SDK's latest version is compatible with it.

- we have a inhouse developed CMDB, can SDK connect to that ?

- also can you please redirect me to some release note or installation guide, to better understand Orion SDK

 

Many thanks in advance.

 

Regards,

mohit


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

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!

I want to change C# source code of Orion website.

Interface aggregate chart (swql)

$
0
0

Hi guys,

 

I'm trying to essentially recreate the Interface Aggregate Chart via the API, but am not having much luck (though I though for a while that I was). My query is

 

SELECT DisplayName, Description, DateTime, InAveragebps, OutAveragebps, TotalBytes,

  TotalPackets, Averagebps, OutPercentUtil, InPercentUtil, PercentUtil, OutMinbps, OutMaxbps, InMinbps, InMaxbps

    FROM Orion.NPM.InterfaceTraffic WHERE InterfaceID=".$interfaceId." AND DateTime > GetUtcDate()-1

 

The problem is - all the data that comes back shows the same value for Min/Max/Avg for In and Out (ie. In Min = In Max = In Avg). How should I tweak this swql to get what I'm after?  Also - for the mods, you guys should consider putting together a 'cookbook' of potentially common queries and distribute it with your SDK

 

This is an example of the chart:

interfaceAggregateChart.gif

 

Thanks!

Retrieve trigger action variables

$
0
0

We have an app that integrates with SW NPM and SAM and pulls in alerts and events via SWIS. We are trying to add a feature to it where we automatically retrieve any Orion variables used in alert trigger definitions. So for example if the Orion alert will log a message of Alert: ${NodeName} rebooted at ${LastBoot} then in our app we want to see two data values, nodename and lastboot, both containing their relevant value.

 

We think we can simply read the alert templates and parse out the variables with a simple regex to get anything that looks like ${}. Once we have this list of variables we can attempt to get the values from SW. The issue is how to get these values.. they seem to be properties that can be found in many different tables since some apply to a node, others to an interface etc. This would be too complex to do this way as we'd have to cater for every variable manually, and there are many. Perhaps there is an alternate way to get these values? Some query or API call that accepts the template and the alert or event and returns the computed variables?

Why is it so hard to find a link to the latest version of the SDK on Thwack?

$
0
0

I currently have SDK v1.9.137 installed.

 

Nessus scans are telling me that there is a vulnerable MSXML file. I found a copy of Interop.MSXML2.dll in C:\Program Files (x86)\SolarWinds\Orion SDK\SWQL Studio. I'm not sure that this is the problem file that Nessus is referring to. But I simply want to see if I have the latest version of the SDK. But how?

 

I've searched everyway I can think of on Thwack.com and solarwinds.com for an SDK download link, and cannot find one. I don't want a one time link in an answer to the post. I want to see the SDK have a home that people can find when searching on something simple like SDK download.

 

=seymour=

Help with SWIS/JSON node addition

$
0
0

Hello,

 

I have just started to dabble with the Orion SDK and am looking for a way to integrate Solarwinds with some Python scripts we have to automatically provision gear, etc.

 

I followed the Python Client sample and have successfully added my nodes and assigned generic SNMP/Uptime/Interface pollers and changed custom properties.  My first problem is that these nodes never have any interfaces added.  I even tried running my nightly import job, and they didn't even show up on the scan.  Interestingly, the rediscovers look to be running, but I'm not sure why the poll is always stuck at when I added the node.  Subsequently, it never seems to discover the machine type, etc.  If I do a list resources from the GUI, I can manually add in all the interfaces.

 

In the end, I'd also like to automatically add these nodes to NCM and, if possible, set it as a device to be scanned for Layer 3 networks in the IPAM module.  I haven't found a ton of documentation on this yet....  Any help would be greatly appreciated.

 

-Scott

Polling Details

Polling IP Addressxxxxxx
Polling Enginexxxxxx
Polling MethodSNMP
Polling Interval120 seconds
Next Poll04:41 PM  (this is in the past)
Statistics Collection10 minutes
Enable 64 bit CountersYes
Rediscovery Interval30 minutes
Next Rediscovery05:59 PM
Last Database UpdateFriday, August 22, 2014 5:50 PM

Internal Server Error when unmanaging node over HTTP

$
0
0

Hi,

 

I am trying to use the Orion SDK to unmanage a node via a http request. My request is as follows:

POST https://10.13.36.29:17778/SolarWinds/InformationService/v3/Json/Invoke/Orion.Nodes/Unmanage HTTP/1.1

Content-Length: 67

Host: 10.13.36.29:17778

Authorization: Basic Q29ubmVjdDpzcG9ydGluZw==

Body:

["N:1114", "2014-03-28T11:55:00Z", "2014-03-28T12:00:00Z", "false"]

 

And the response I am getting is:

HTTP/1.1 500 Internal Server Error

Content-Length: 275

Content-Type: application/json

Server: Microsoft-HTTPAPI/2.0

Date: Fri, 28 Mar 2014 11:53:18 GMT

 

"The incoming message has an unexpected message format 'Raw'. The expected message formats for the operation are 'Xml', 'Json'. This can be because a WebContentTypeMapper has not been configured on the binding. See the documentation of WebContentTypeMapper for more details."

 

Is my request correctly formed and is there somewhere that I can take a look at what the internal server error is?

 

Thanks,

Kristian

Is bulk delete available in the REST api of ORION?

$
0
0

Hello all,

 

I am using the REST api and need to delete a bunch of nodes. I found that there is a bulkdelete call available for SOAP.

Is this functionality available for the REST api as well? If it is available, how would I pass the list of uris that I want deleted?

 

Examples for passing the uri list argument to the call would be very helpful.

 

Thanks,

 

Nuruddin

Adding of interfaces to a node. XML?

$
0
0

Hello everyone!

 

I'm moving along in my scripting adventure with the SDK and PowerShell but I've hit a snag when it comes to handling the addition of interfaces. I'm looking at the example given after installing the SDK and it looks just like adding a node, awesome! But when I try to add an interface to a node I'm getting an error back stating that '

A positional parameter cannot be found that accepts argument '.'.'

 

I'm looking at the verbs and I'm seeing XML but the sample script does not show any need for XML. Has this changed?

 

My code below:

#Function to add Interfaces

##############################################################

function AddInterface ($NewNodeID, $InterfaceInfo, $Pollers)

{

Write-Host "Entering AddInterface Function"

$AllInterfacePollers = Get-SwisData $swis "Select Distinct PollerType from Orion.Pollers Where NetObjectType = 'I'"

 

 

 

 

    foreach ($Interface in $InterfaceInfo)

    {

    $InterfaceIndex = $Interface.Interfaceindex

    Write-Host "Interface index: $InterfaceIndex"

    $Caption = $Interface.InterfaceName

    Write-Host "Interface name: $Caption"

   

    $newIfaceProps = @{

        NodeID=$NewNodeID; # NodeID on which the interface is working on

        InterfaceName=$Caption; # description name of the interface to add

        InterfaceIndex=$InterfaceIndex;

        ObjectSubType="SNMP";

        Status=0;

        RediscoveryInterval=5;

        PollInterval=120;

        StatCollection=10;

            }

   

    $newIfaceUri = New-SwisObject $swis -EntityType "Orion.NPM.Interfaces" -Properties $newIfaceProps.

    $ifaceProps = Get-SwisObject $swis -Uri $newIfaceUri

   

    $newIfaceUri

 

 

    ForEach ($PollerAdd in $Pollers){

    IF($AllInterfacePollers -contains $PollerAdd)

    {

    Write-Host "Found Poller $PollerAdd"

      $poller = @{

        PollerType="$PollerAdd";

        NetObject="I:"+$ifaceProps["InterfaceID"];

        NetObjectType="I";

        NetObjectID=$ifaceProps["InterfaceID"];

        }

    $pollerUri = New-SwisObject $swis -EntityType "Orion.Pollers" -Properties $poller

    $pollerUri

    }

    }

 

    }

Write-Host "Exiting AddInterface function"

 

 

}

Orion SDK --Perl -- Add node issue

$
0
0

Using below Perl code against our standalone NCM setup, I can create new node and attach "SNMP" pollers to it. I can see, through querying SWQL, that the software (NCM 7.2.1) populate node data in Orion.Nodes (vendor, vendor icon, systemoid, location..) but only when it due for next discovery (30mins), I dont see the software discover it at first place after added. Also when drilling into node detail page, all the information under Node details are suppressed. Checking the Orion.DiscoveredPoller and DiscoverNodes, I could not see my new node in either of them, Am i missing anything?

 

 

 

***** extracted code ****

 

my $AddedNode = $swis->Create('Orion.Nodes',

    {

    IPAddress=> $ip,

    IPAddressGUID=>ip2guid($ip),

    EntityType=>'Orion.Nodes',

    Caption=>$node_name,

    DynamicIP=>$False,

    EngineID=>$True,

    Status=>$True,

    UnManaged=>$False,

    Allow64BitCounters=>$True,

    External=>$False,

    ObjectSubType=>"SNMP",

    Community=>"xxxxxxxx",

    SNMPVersion=>2,

    Comments=>"added by script",

    });

 

$swis->Create("Orion.Pollers", {

            'PollerType'=>$poller,

            'NetObject'=>"N:$node",

            'NetObjectType'=>'N',

            'NetObjectID'=>$node

            });

Compilation error while using solarwinds SDK via servicereference - "namespace already contains a definition of "queryOutputFormat". No usercode.

$
0
0

Help please, I am a newbie trying to get the orion sdk to work with c#. I am getting compilation error while using solarwinds SDK via servicereference - "namespace already contains a definition of "queryOutputFormat". No usercode. All i did was add the service reference to the url. Version 2 ( could not find version 3 wsdl) used

.

Help with SWQL - Day of the week?

$
0
0

Ok, just starting off with SWQL and I am trying to replicate some of the things that have been done with report-writer in the past here.   One of the things is a report that gives availability for a group of sites during business hours (ie: M-F 8am-5pm).    Curious how this can be done?  I've got it to the point where I'm getting availability reports, and I'm getting them for between the hours of 8am to 5pm (I think).  But I'm stuck on how to get the Day-of-the-week (DOTW) done?

 

Was hoping for a function that might return that, but I don't see any in the documentation I've been able to dig up.   I was thinking of using the DayDiff function to find the # of days since a given Monday lets say, and then wanted to mod it by 7 and figure out the DOTW based on the remainder, but I don't think SWQL has that kind of math ability?

 

Anyone have any good ideas for getting this done?   Or am I SOL on getting it done with SWQL?  :-)

Executing CLI for NCM with Python language

$
0
0

http://t.co/JUyJEt8oWu

http://thwack.solarwinds.com/thread/39001


c3849a86-c48d-11e3-8017-22000ab926d3-large.png




Hello, My name is David, Shin and Interested in the SDN and ACI for Cisco now,

Tis interface can programable with the python language, also SolarWinds provide API for free with python support.

to fullfill the functions from the another new customer requirements, should make a some script with python language.

 

Let me know how to control solariwinds product with sdk plz.

also we test the solarwinds API with Powershell, sample script works well,

 

Not plan to use the solarwinds api to connect to the cisco devices directly,

just want to use it connecting with the solarwinds NCM .

 

Running python script via solarwinds api to the NCM then operate ncm control the each registered cisco and other network devices.

hope to help understanding the concept.

 

when i execute the sample python script in the SDK 1.8 following error was occured, i have no idea why this is happened

i install the NPM 10.7 and NCM 7.2.2

 

 

 

Best Regards

David, Shin.


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.

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

Custom SWQL query for route flaps

$
0
0

Hello,
I'm trying to come up with a custom query that I can add to a web view for flapping routes. However, I'm having trouble with the SWQL syntax. I'd like to be able to see the top XX route changes from any device.
I can run this command in SQL Studio Manager:
SELECT TOP 100 * FROM [dbo].[NPM_RoutingTable_Flap]

But, I can't seem to translate this into the SWQL syntax that the custom query form wants.

Any assistance is greatly appreciated!


Thank you,
Robert

IPAM + PowerShell

$
0
0

Greetings,

 

Used the following to get an available IP:How to use the IPAM API and get "Free IP Address"

 

Getting an error while trying to update any information:

Set-SwisObject : Operation not supported on IPAM.IPNode

 

While using the following:

 

$ip = Get-SwisData $swis 'SELECT TOP 1 I.DisplayName FROM IPAM.IPNode I WHERE Status=2 AND I.Subnet.DisplayName = ''1.1.0.0/24'''

$ipobject = Get-SwisObject -Uri (Get-SwisData $swis ('SELECT Uri from IPAM.IPNode where IPAddress = ''' + $ip + '''')) -SwisConnection $swis

 

$customProps = @{

  Description="TACOS";

}

 

Set-SwisObject -Uri $ipobject.Uri -SwisConnection $swis -Properties $customProps

 

Anyone trying to reserve IPs???

How can I deploy Application monitors using Powershell and the Orion SDK?

Viewing all 3719 articles
Browse latest View live


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