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

Import/Export Reports

$
0
0

is there an api to import/export reports? 

 


Python API add node?

$
0
0

Is it possible to add a node using the python api? I have been trying and have been unsuccessful. Here are the requests I've tried to perform:

 

Using API:

r = swis.create(Orion.Nodes, {"IPAddress = " + ip + "; EngineID = 1; ObjectSubType = " + objsubtype+ "; Caption = " + caption + ";"})

 

Using requests:

r = requests.request("POST", "https://solarwinds:17778/SolarWinds/InformationService/v3/Json/Create/Orion.Nodes", data=json.dumps("Orion.Nodes", {"IPAddress = " + ip + "; EngineID = 1; ObjectSubType = " + objsubtype+ "; Caption = " + caption + ";"}), verify=False, auth=(username, password), headers={'Content-Type': 'application/json'})

 

Unfortunately, all I have been able to get is a 500 response.Can anybody help?

How to know the nodes that are not present in solarwinds

$
0
0

Hi

 

Am using the below script to unmanage the nodes. but the problem is if i give a node that is not in solarwinds its trying to unmanage instead of mentioning the node is not in solarwinds. Can some one help me to get the details of nodes that is not in solarwinds  and to unmanage other nodes from the given excel file

 

Add-Pssnapin swissnapin

$swis = Connect-Swis -Hostname orion -Username admin -Password supersecret

$captions = Get-Content .\nodes-to-unmanage.txt

$nodes = Get-SwisData $swis "SELECT Uri FROM Orion.Nodes WHERE Caption IN @captions AND Unmanaged=0" @{captions=$captions}

$nodes | Set-SwisObject $swis -Properties @{UnmanageFrom=[DateTime]::UtcNow;UnmanageUntil=[DateTime]::UtcHours}

Faulted state error on SWQL

$
0
0

when using aggregate funcitons on SWQL i get met with the following error.

 

The communication object,

System.ServiceModel.Security.SecuritySessionClientSettings'1+ClientSecurityDuplexSessionChannel[System.ServiceModel.Channels.IDuplexSesionChannel], cannot be used for communication because it is in the Faulted state.

 

any help would be great thanks.

Invoke-SwisVerb - Access Denied

$
0
0

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

 

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

 

Download the SDK Installer

$
0
0

I got tired of checking and downloading new versions of the Orion SDK from GitHub.  OK, so I didn't exactly get tired of it, but I decided to have my computer do this for me.  So how best to do it?  PowerShell of course!

$TargetDirectory    = "C:\Place\I\Want\To\Save\The\Downloads"
$DownloadBetas      = $true
$DownloadLatestOnly = $false
$SdkPage = Invoke-WebRequest -Uri "https://github.com/solarwinds/OrionSDK/releases"
$Links = $SdkPage.Links | Where-Object { $_.innerText -like "*OrionSDK.msi*" }
$Links | Add-Member -MemberType ScriptProperty -Name IsBeta -Value { $this.href.Split("/")[-2] -like "*-beta" } -Force
$Links | Add-Member -MemberType ScriptProperty -Name Version -Value { if ( $this.IsBeta ) { [Version]( $this.href.Replace("v", "").Replace("-beta", "").Split("/")[-2] ) } else { [version]( $this.href.Replace("v", "").Split("/")[-2] ) } } -Force
$Links | Add-Member -MemberType ScriptProperty -Name Url -Value { "https://github.com$( $this.href )" } -Force
$Links | Add-Member -MemberType ScriptProperty -Name FileName -Value { "OrionSDK_$( $this.Version )$( if ( $this.IsBeta ) { "-beta" } ).msi" }
if ( $DownloadLatestOnly -and $DownloadBetas )
{    $DownloadLinks = $Links | Sort-Object -Property Version -Descending | Select-Object -First 1
}
elseif ( $DownloadLatestOnly -and -not $DownloadBetas )
{    $DownloadLinks = $Links | Where-Object { -not $_.IsBeta } | Sort-Object -Property Version -Descending | Select-Object -First 1
}
elseif ( -not $DownloadLatestOnly -and -not $DownloadBetas )
{    $DownloadLinks = $Links | Where-Object { -not $_.IsBeta }
}
else # ( -not $DownloadLatestOnly -and $DownloadBetas )
{    $DownloadLinks = $Links
}
$DownloadLinks | ForEach-Object { Invoke-WebRequest -Uri $_.Url -OutFile ( Join-Path -Path $TargetDirectory -ChildPath $_.FileName ) }

 

This does a few things:

1) Gets all of the MSI Downloads from the above page.

2) Adds the IsBeta and the Version members to the link objects

3) Filters (depending on the DownloadBetas and DownloadLatestOnly flags)

4) Download them.

Python - listing/adding resources to agent polled node

$
0
0

Hi Everyone,

 

We have a vm template that has the agent installed on the system already. Once a system is provisioned,  our C.M. activates the agent and it shows up in Orion but with no resources listed.

 

I am trying to figure out how to perform the same functions as list resources would, from research I am guessing I would have to do a discovery on the node but everything is based on SNMP that I see. End goal is being able to programmatically add/remove resources ( volumes, interfaces, cpu/mem) for a agent polled node thats already in Orion. 

 

Thanks for any help.

Connect-Swis Authentication Issues

$
0
0

Hello,

 

My company does not allow for the Orion SDK to be installed on the same server as the SQL database is on.

 

We are also not allowed to hard code any username or passwords into our scripts.

 

The admin does not want to enter their username or password using the get-credential call either.

 

That leaves me with two options when using connect-swis:

 

-Trusted and -Certificate

 

I have already tried both of these options remotely but have no success, I believe there is a firewall blocking my access.

 

How have you guys overcome this security issue?

 

Also what exactly are these calls?

 

Thanks,

 

Will.


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.

Orion SDK Performance Tips

$
0
0

We just got a developer that will be working to develop helpful programs to aid us in administering our Orion environment.  For now though we use a lot of PowerShell scripts that I write to automate many tasks, usually those tasks are automating custom properties.  One issue I run into often is my PowerShell scripts take a long time to run.  I've gotten better at improving my code to loop through items less often and things like that, but I'm looking for some additional tips.

 

- When I'm invoking verbs, specifically the Set-SwisObject verb, am I able to send multiple objects to this, or do I need to do one object at a time?  I know I can send multiple properties for a single node to it, but can I just send a whole hash table full of Node Custom Property URI's, Properties, and their desired values at it, or is looping through each node necessary?  If so how should this look?

 

- Same question with other verbs?

 

- Our Developer will be re-creating my PowerShell scripts into more robust .Net Programs using C# mostly.  Are there any general performance tips for interacting with the API via C#?

 

- Any general performance tips for the API in general or just the API via PowerShell?

 

Thanks for any assistance you may be able to offer.

CronExpression decoded in SWQL

$
0
0

This is my first successful draft of a code bit that will decode the CronExpression column for alert time periods in a totally SWQL friendly way.

 

This code is not pretty. It is not elegant. It does not cover every Crontab configuration that is ever possible ever.

 

It DOES run in a web report. It DOES, as far as I can tell, handle all the possible configurations available with in Solarwinds.

 

 

SELECT
f.CronExpression
    ,CASE WHEN (f.CronExpression NOT LIKE '% % */1 %' AND f.CronExpression LIKE '% % % * *')
               OR f.CronExpression LIKE '% % % 1,2,3,4,5,6,7,8,9,10,11,12 %' THEN 'Monthly'
        WHEN f.CronExpression LIKE '% % %-% %' THEN 'Monthly'
        WHEN f.CronExpression LIKE '% % */1 %' THEN 'Daily'
        WHEN f.CronExpression LIKE '% % % % %' AND f.CronExpression NOT LIKE '% % % % *' THEN 'Weekly'
        ELSE '??'
        END AS Frequency
    ,(CASE WHEN f.CronExpression LIKE '% % % * %'

               OR f.CronExpression LIKE '% % % 1,2,3,4,5,6,7,8,9,10,11,12 %' THEN 'All'
        ELSE (
     (CASE WHEN f.CronExpression LIKE '% % % %1% %' THEN 'January,' ELSE '' END) +
     (CASE WHEN f.CronExpression LIKE '% % % %2% %' THEN 'February,' ELSE '' END) +
     (CASE WHEN f.CronExpression LIKE '% % % %3% %' THEN 'March,' ELSE '' END) +
     (CASE WHEN f.CronExpression LIKE '% % % %4% %' THEN 'April,' ELSE '' END) +
     (CASE WHEN f.CronExpression LIKE '% % % %5% %' THEN 'May,' ELSE '' END) +
     (CASE WHEN f.CronExpression LIKE '% % % %6% %' THEN 'June,' ELSE '' END) +
     (CASE WHEN f.CronExpression LIKE '% % % %7% %' THEN 'July,' ELSE '' END) +
     (CASE WHEN f.CronExpression LIKE '% % % %8% %' THEN 'August,' ELSE '' END) +
     (CASE WHEN f.CronExpression LIKE '% % % %9% %' THEN 'September,' ELSE '' END) +
     (CASE WHEN f.CronExpression LIKE '% % % %10% %' THEN 'October,' ELSE '' END) +
     (CASE WHEN f.CronExpression LIKE '% % % %11% %' THEN 'November,' ELSE '' END) +
     (CASE WHEN f.CronExpression LIKE '% % % %12% %' THEN 'December,' ELSE '' END) 
        ) END) AS MonthOfYear
    , CASE WHEN f.CronExpression LIKE '% % */1 %' THEN ' '
        WHEN f.CronExpression LIKE '% % * %' THEN 'Every '
        WHEN f.CronExpression LIKE '% % _ %' AND f.CronExpression LIKE '_ _ %1 %' THEN (SUBSTRING(f.CronExpression,5,2) + 'st')
        WHEN f.CronExpression LIKE '% % _ %' AND f.CronExpression LIKE '__ _ %1 %' THEN (SUBSTRING(f.CronExpression,6,2) + 'st')
        WHEN f.CronExpression LIKE '% % _ %' AND f.CronExpression LIKE '_ __ %1 %' THEN (SUBSTRING(f.CronExpression,6,2) + 'st')
        WHEN f.CronExpression LIKE '% % _ %' AND f.CronExpression LIKE '__ __ %1 %' THEN (SUBSTRING(f.CronExpression,7,2) + 'st')
        WHEN f.CronExpression LIKE '% % _ %' AND f.CronExpression LIKE '_ _ %2 %' THEN (SUBSTRING(f.CronExpression,5,2) + 'nd')
        WHEN f.CronExpression LIKE '% % _ %' AND f.CronExpression LIKE '__ _ %2 %' THEN (SUBSTRING(f.CronExpression,6,2) + 'nd')
        WHEN f.CronExpression LIKE '% % _ %' AND f.CronExpression LIKE '_ __ %2 %' THEN (SUBSTRING(f.CronExpression,6,2) + 'nd')
        WHEN f.CronExpression LIKE '% % _ %' AND f.CronExpression LIKE '__ __ %2 %' THEN (SUBSTRING(f.CronExpression,7,2) + 'nd')
        WHEN f.CronExpression LIKE '% % _ %' AND f.CronExpression LIKE '_ _ %3 %' THEN (SUBSTRING(f.CronExpression,5,2) + 'rd')
        WHEN f.CronExpression LIKE '% % _ %' AND f.CronExpression LIKE '__ _ %3 %' THEN (SUBSTRING(f.CronExpression,6,2) + 'rd')
        WHEN f.CronExpression LIKE '% % _ %' AND f.CronExpression LIKE '_ __ %3 %' THEN (SUBSTRING(f.CronExpression,6,2) + 'rd')
        WHEN f.CronExpression LIKE '% % _ %' AND f.CronExpression LIKE '__ __ %3 %' THEN (SUBSTRING(f.CronExpression,7,2) + 'rd')
        WHEN f.CronExpression LIKE '% % _ %' AND f.CronExpression LIKE '_ _ % %' AND f.CronExpression NOT LIKE '% % * %' THEN (SUBSTRING(f.CronExpression,5,2) + 'th')
        WHEN f.CronExpression LIKE '% % _ %' AND f.CronExpression LIKE '__ _ % %' AND f.CronExpression NOT LIKE '% % * %' THEN (SUBSTRING(f.CronExpression,6,2) + 'th')
        WHEN f.CronExpression LIKE '% % _ %' AND f.CronExpression LIKE '_ __ % %' AND f.CronExpression NOT LIKE '% % * %' THEN (SUBSTRING(f.CronExpression,6,2) + 'th')
        WHEN f.CronExpression LIKE '% % _ %' AND f.CronExpression LIKE '__ __ % %' AND f.CronExpression NOT LIKE '% % * %' THEN (SUBSTRING(f.CronExpression,7,2) + 'th')
        WHEN f.CronExpression LIKE '% % 1-7 %' THEN 'First'
        WHEN f.CronExpression LIKE '% % 8-14 %' THEN 'Second'
        WHEN f.CronExpression LIKE '% % 15-21 %' THEN 'Third'
        WHEN f.CronExpression LIKE '% % 22-28 %' THEN 'Fourth'
        WHEN f.CronExpression LIKE '% % 29-31 %' THEN 'Fifth'
        ELSE '??'
        END AS DayOfMonth
    ,((CASE WHEN f.CronExpression LIKE '% % % % %0%' THEN 'Sunday,' ELSE '' END) +
     (CASE WHEN f.CronExpression LIKE '% % % % %1%' THEN 'Monday,' ELSE '' END) +
     (CASE WHEN f.CronExpression LIKE '% % % % %2%' THEN 'Tuesday,' ELSE '' END) +
     (CASE WHEN f.CronExpression LIKE '% % % % %3%' THEN 'Wednesday,' ELSE '' END) +
     (CASE WHEN f.CronExpression LIKE '% % % % %4%' THEN 'Thursday,' ELSE '' END) +
     (CASE WHEN f.CronExpression LIKE '% % % % %5%' THEN 'Friday,' ELSE '' END) +
     (CASE WHEN f.CronExpression LIKE '% % % % %6%' THEN 'Saturday,' ELSE '' END)
        ) AS DayOfWeek
    ,(CASE WHEN f.CronExpression LIKE '0 %' AND f.CronExpression LIKE '_ __ %' THEN SUBSTRING(f.CronExpression,3,2)
            WHEN f.CronExpression LIKE '0 %' AND f.CronExpression LIKE '_ _ %' THEN ('0' + SUBSTRING(f.CronExpression,3,1))
            WHEN f.CronExpression NOT LIKE '0 %' AND f.CronExpression LIKE '__ __ %' THEN SUBSTRING(f.CronExpression,4,2)
            WHEN f.CronExpression NOT LIKE '0 %' AND f.CronExpression LIKE '_ _ %' THEN ('0' + SUBSTRING(f.CronExpression,1,1))
            WHEN f.CronExpression NOT LIKE '0 %' AND f.CronExpression LIKE '__ _ %' THEN ('0' + SUBSTRING(f.CronExpression,1,1))
        ELSE '??'
        END)  + ':' +
    (CASE WHEN f.CronExpression LIKE '0 %' AND f.CronExpression LIKE '_ __ %' THEN ('0' + SUBSTRING(f.CronExpression,1,2))
            WHEN f.CronExpression LIKE '0 %' AND f.CronExpression LIKE '_ _ %' THEN ('0' + SUBSTRING(f.CronExpression,1,1))
            WHEN f.CronExpression NOT LIKE '0 %' AND f.CronExpression LIKE '__ __ %' THEN SUBSTRING(f.CronExpression,1,2)
            WHEN f.CronExpression NOT LIKE '0 %' AND f.CronExpression LIKE '__ _ %' THEN SUBSTRING(f.CronExpression,1,2)
            WHEN f.CronExpression NOT LIKE '0 %' AND f.CronExpression LIKE '_ _ %' THEN ('0' + SUBSTRING(f.CronExpression,1,1))
        ELSE '??'
        END) AS TimeOfDay

FROM Orion.Frequencies f

Add UDT ports via API

$
0
0

I have not found a way to do this, but maybe I'm not looking in the right place. We've got Python scripts for discovering and adding nodes and interfaces via API no problem. We're using corePluginConfig  and  interfacesPluginConfig to accomplish this. But I have not seen a similar "ports" PluginConfig (i.e. portsPluginConfig). When we started down the road of automating device entry, we assumed UDT ports would also be available to us via API. Like when we import discovered results in the web console, the Interfaces screen (with all of its selection criteria and filtering) is followed by an almost identical Ports screen. So it seemed safe to assume we would be able to include UDT ports when automating device entry via API.

 

Hopefully I'm just missing something and the option to do this is available.

 

Thanks!

PowerShell - Create and update Custom Property for a node being monitored via ICMP.

$
0
0

Hello Orion Experts.

I am trying to create and update custom property values for 300+ nodes that are being monitored via ICMP.  Found a script OrionSDK/CRUD.SettingCustomProperty.ps1 at master · solarwinds/OrionSDK · GitHub  to update the custom property. When i try to get the data from Swis using Get-OrionNode command i do not get property interfaceID. the script above is using interface Id to set and update the property values.  Script above is asking to build interface ID.  Please let me know if i am using a wrong interface or if there is a better way to get the task done.

 

$uri="swis://localhost/Orion/Orion.Nodes/NodeID=$($nodeId)/CustomProperties";
# set the custom property
Set-SwisObject$swis-Uri $uri-Properties $customProps
# build the interface URI
$uri="swis://localhost/Orion/Orion.Nodes/NodeID=$($nodeId)/Interfaces/InterfaceID=$($ifaceId)/CustomProperties";

 

 

Following is the datatype from Get-OrionNode output. 

 

TypeName: System.Management.Automation.PSCustomObject

 

 

Name                                  MemberType   Definition                                                              

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

Equals                                Method       bool Equals(System.Object obj)                                          

GetHashCode                           Method       int GetHashCode()                                                       

GetType                               Method       type GetType()                                                          

ToString                              Method       string ToString()                                                       

AgentPort                             NoteProperty string AgentPort=161                                                    

Allow64BitCounters                    NoteProperty bool Allow64BitCounters=True                                            

AncestorDetailsUrls                   NoteProperty string[] AncestorDetailsUrls=System.String[]                            

AncestorDisplayNames                  NoteProperty string[] AncestorDisplayNames=System.String[]                           

AvgResponseTime                       NoteProperty int AvgResponseTime=1                                                   

BlockUntil                            NoteProperty datetime BlockUntil=12/30/1899 4:00:00 AM                               

BufferBgMissThisHour                  NoteProperty double BufferBgMissThisHour=0                                           

BufferBgMissToday                     NoteProperty double BufferBgMissToday=0                                              

BufferHgMissThisHour                  NoteProperty double BufferHgMissThisHour=0                                           

BufferHgMissToday                     NoteProperty double BufferHgMissToday=0                                              

BufferLgMissThisHour                  NoteProperty double BufferLgMissThisHour=0                                           

BufferLgMissToday                     NoteProperty double BufferLgMissToday=0                                              

BufferMdMissThisHour                  NoteProperty double BufferMdMissThisHour=0                                           

BufferMdMissToday                     NoteProperty double BufferMdMissToday=0                                              

BufferNoMemThisHour                   NoteProperty double BufferNoMemThisHour=0                                            

BufferNoMemToday                      NoteProperty double BufferNoMemToday=0                                               

BufferSmMissThisHour                  NoteProperty double BufferSmMissThisHour=0                                           

BufferSmMissToday                     NoteProperty double BufferSmMissToday=0                                              

Caption                               NoteProperty string Caption=nyu01cu1.stnyu01.isyntax.net                             

Category                              NoteProperty int Category=2                                                          

ChildStatus                           NoteProperty int ChildStatus=1                                                       

CMTS                                  NoteProperty char CMTS=N                                                             

Community                             NoteProperty string Community=                                                       

Contact                               NoteProperty string Contact=                                                         

CPULoad                               NoteProperty int CPULoad=-2                                                          

CustomPollerLastStatisticsPoll        NoteProperty datetime CustomPollerLastStatisticsPoll=12/30/1899 4:00:00 AM           

CustomPollerLastStatisticsPollSuccess NoteProperty datetime CustomPollerLastStatisticsPollSuccess=12/30/1899 4:00:00 AM    

CustomStatus                          NoteProperty bool CustomStatus=False                                                 

Description                           NoteProperty string Description=Unknown                                              

DetailsUrl                            NoteProperty string DetailsUrl=/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N:6255   

DisplayName                           NoteProperty string DisplayName=             

DNS                                   NoteProperty string DNS=                                                             

DynamicIP                             NoteProperty bool DynamicIP=False                                                    

EngineID                              NoteProperty int EngineID=9                                                          

EntityType                            NoteProperty string EntityType=Orion.Nodes                                           

External                              NoteProperty bool External=False                                                     

GroupStatus                           NoteProperty string GroupStatus=Up.gif                                               

Icon                                  NoteProperty string Icon=Unknown.gif                                                 

Image                                 NoteProperty DBNull Image=                                                           

InstanceSiteId                        NoteProperty int InstanceSiteId=0                                                    

InstanceType                          NoteProperty string InstanceType=Orion.Nodes                                         

IOSImage                              NoteProperty string IOSImage=                                                        

IOSVersion                            NoteProperty string IOSVersion=                                                      

IP                                    NoteProperty string IP=                                             

IPAddress                             NoteProperty string IPAddress=                                     

IPAddressGUID                         NoteProperty guid IPAddressGUID=               

IPAddressType                         NoteProperty string IPAddressType=IPv4                                               

IP_Address                            NoteProperty string IP_Address=                                      

IsOrionServer                         NoteProperty bool IsOrionServer=False                                                

IsServer                              NoteProperty bool IsServer=False                                                     

LastBoot                              NoteProperty DBNull LastBoot=                                                        

LastSync                              NoteProperty datetime LastSync=                              

LastSystemUpTimePollUtc               NoteProperty DBNull LastSystemUpTimePollUtc=                                         

Location                              NoteProperty string Location=                                                        

MachineType                           NoteProperty string MachineType=Unknown                                              

MaxResponseTime                       NoteProperty int MaxResponseTime=2                                                   

MemoryAvailable                       NoteProperty DBNull MemoryAvailable=                                                 

MemoryUsed                            NoteProperty double MemoryUsed=-2                                                    

MinResponseTime                       NoteProperty int MinResponseTime=1                                                   

MinutesSinceLastSync                  NoteProperty int MinutesSinceLastSync=1                                              

NextPoll                              NoteProperty datetime NextPoll=                          

 

NodeDescription                       NoteProperty string NodeDescription=                                                 

NodeID                                NoteProperty int NodeID=6255                                                         

                   

ObjectSubType                         NoteProperty string ObjectSubType=ICMP                                               

OrionIdColumn                         NoteProperty string OrionIdColumn=NodeID                                             

OrionIdPrefix                         NoteProperty string OrionIdPrefix=N:                                                 

PercentLoss                           NoteProperty double PercentLoss=0                                                    

PercentMemoryAvailable                NoteProperty int PercentMemoryAvailable=100                                          

PercentMemoryUsed                     NoteProperty int PercentMemoryUsed=0                                                 

PollInterval                          NoteProperty int PollInterval=90                                                     

RediscoveryInterval                   NoteProperty int RediscoveryInterval=30                                              

ResponseTime                          NoteProperty int ResponseTime=2                                                      

RWCommunity                           NoteProperty string RWCommunity=                                                     

Severity                              NoteProperty int Severity=0                                                          

SkippedPollingCycles                  NoteProperty int SkippedPollingCycles=0                                              

SNMPVersion                           NoteProperty int16 SNMPVersion=0                                                     

StatCollection                        NoteProperty int StatCollection=10                                                   

Status                                NoteProperty int Status=1                                                            

StatusDescription                     NoteProperty string StatusDescription=Node status is Up.                             

StatusIcon                            NoteProperty string StatusIcon=Up.gif                                                

StatusIconHint                        NoteProperty DBNull StatusIconHint=                                                  

StatusLED                             NoteProperty string StatusLED=Up.gif                                                 

SysName                               NoteProperty string SysName=                                                         

SysObjectID                           NoteProperty string SysObjectID=                                                     

SystemUpTime                          NoteProperty double SystemUpTime=0                                                   

TotalMemory                           NoteProperty float TotalMemory=0                                                     

UiSeverity                            NoteProperty int UiSeverity=0                                                        

UnManaged                             NoteProperty bool UnManaged=False                                                    

UnManageFrom                          NoteProperty datetime UnManageFrom=12/30/1899 12:00:00 AM                            

UnManageUntil                         NoteProperty datetime UnManageUntil=12/30/1899 12:00:00 AM                           

Vendor                                NoteProperty string Vendor=Unknown                                                   

VendorIcon                            NoteProperty string VendorIcon=Unknown.gif  

Add polling of NIC, Asset Inventory, and Windows Scheduled Tasks to new WMI node

$
0
0

Hello,

We are currently customizing the CRUD.AddWMINode.ps1 sample script from GitHub to add Windows nodes to Orion. We have been able to add most of the components using the script; however, we do not know how to add polling of the NIC, Asset Inventory, and Windows Scheduled Tasks using the script. Please see the image below for what we are trying to add using the PowerShell script:

 

 

Thank you for the help!

Connect-Swis Authentication Issues

$
0
0

Hello,

 

My company does not allow for the Orion SDK to be installed on the same server as the SQL database is on.

 

We are also not allowed to hard code any username or passwords into our scripts.

 

The admin does not want to enter their username or password using the get-credential call either.

 

That leaves me with two options when using connect-swis:

 

-Trusted and -Certificate

 

I have already tried both of these options remotely but have no success, I believe there is a firewall blocking my access.

 

How have you guys overcome this security issue?

 

Also what exactly are these calls?

 

Thanks,

 

Will.


Update Custom IP Property

$
0
0

We have a custom property, WO_Inc_Task_CRQ, that we use to store info related to the CRQ that requested the IP.  Is there a method to update that custom property via powershell?  We have updated the standard IP information such as DNSBackward, Alias, and Comments.

Timeout error while trying to query Orion.Netflows.Flows in SWQL studio

$
0
0

Hi,

 

I have to extract Netflow details full list of all the conversations using SWQL studio. The query was getting timed out after 2 minutes. Increased the timeout in the file

C:\Program Files (x86)\SolarWinds\Orion SDK\SWQL Studio\SwqlStudio.exe.config

 

But still it is getting timed out at the higher time out period(increased it to about 30 minutes).

 

The query used was  "Select ApplicationID,DestinationIP,Packets,Ports,ProtocolID,SourceIP,TimeStamp FROM Orion.Netflow.Flows" . Even tried to fetch for top 100 but it timed out.

 

Is there a way I could extract these information.

Custom query help

$
0
0

Greetings Everyone,

 

 

Need help constructing a complex SWQL query to build a historical BW utilization table going back 180 days IN/OUT and broken up by month. Goal is to have it be 1 line, multiple columns per node/interface within a custom table as part of a larger situational awareness dashboard for our director. We would also like the values to conditionally format based on what percentage is returned for that given month. An example being Interface X off of Node Y was at 90% utilization per the 95th percentile IN for the month of March. We want that 90% value to be Red. If it dropped to 36% in May we want that value to be Green. The conditional format color just going off the already out of the box Solarwinds default thresholds.

 

 

I've already tried the syntax suggested in this thread: https://thwack.solarwinds.com/thread/113097 But I just get "Query is not valid" when attampting to use

 

 

DateTrunc(‘day’, T.ObservationTimestamp) AS [Day],

AVG(T.Traffic.InAveragebps) AS InAvgBps, AVG(T.Traffic.OutAveragebps) AS OutAvgBps,

MIN(T.Traffic.InMinbps) AS InMinBps, AVG(T.Traffic.OutMinbps) AS OutMinBps

MAX(T.Traffic.InMaxbps) AS InMaxBps, AVG(T.Traffic.OutMinbps) AS OutMaxBps

 

 

Or the subquery further down the thread.

 

 

We are on the latest version of NPM here.

 

 

This is what I have so far trying different things to also add in some fields to another custom table we're working on for the same dashboard. We have tabs capturing assets from different regions which is why we are using the CarrierName to filter out the other nodes/interfaces.

 

 

SELECT N.Caption AS [Node Name],

C.CarrierName AS PACE,

I.Name,

T.ObservationTimestamp,

T.InTotalPkts AS [Total Pkts IN],

T.OutTotalPkts AS [Total Pkts OUT],

'/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N%3a'+ToString(N.NodeID) AS [_LinkFor_Node Name],

'/Orion/NetPerfMon/NodeDetails.aspx?NetObject=I:'+ToString(I.InterfaceID)+'&view=InterfaceDetails' AS [_LinkFor_Name],

I.DetailsUrl,

N.DetailsUrl

  FROM Orion.Nodes AS N

  INNER JOIN Orion.NPM.Interfaces AS I on N.NodeID=I.NodeID

  INNER JOIN Orion.NPM.InterfaceTraffic AS T on N.NodeID=T.NodeID

  INNER JOIN Orion.NPM.InterfacesCustomProperties AS C on I.InterfaceID=C.InterfaceID

  WHERE C.CarrierName Like 'Primary_b%'

  OR C.CarrierName Like 'Alternate_b%'

  ORDER BY N.Caption Asc, C.CarrierName Desc

Faulted state error on SWQL

$
0
0

when using aggregate funcitons on SWQL i get met with the following error.

 

The communication object,

System.ServiceModel.Security.SecuritySessionClientSettings'1+ClientSecurityDuplexSessionChannel[System.ServiceModel.Channels.IDuplexSesionChannel], cannot be used for communication because it is in the Faulted state.

 

any help would be great thanks.

error when powershell connect to Orion

$
0
0

Hi! I need use Orion SDK to do an automatization in powershell. I already installed orion SDK and PowerOrion in powershell but when I run my script to connect with Orion fail.

 

the error is:

Connect-Swis : El término 'Connect-Swis' no se reconoce como nombre de un cmdlet, función, archivo de script o programa ejecutable.  Compruebe si escribió correctamente el nombre o, si incluyó una ruta de acceso, compruebe que dicha ruta es correcta e inténtelo de  nuevo. En C:\Users\carballe\Desktop\Orion SDK\script\AgregaNodoCajero_v1.ps1: 14 Carácter: 9 + $swis = Connect-Swis -host $hostname -cred $creds +         ~~~~~~~~~~~~     + CategoryInfo          : ObjectNotFound: (Connect-Swis:String) [], CommandNotFoundException     + FullyQualifiedErrorId : CommandNotFoundException   Get-SwisData : El término 'Get-SwisData' no se reconoce como nombre de un cmdlet, función, archivo de script o programa ejecutable.  Compruebe si escribió correctamente el nombre o, si incluyó una ruta de acceso, compruebe que dicha ruta es correcta e inténtelo de  nuevo. En C:\Users\carballe\Desktop\Orion SDK\script\AgregaNodoCajero_v1.ps1: 18 Carácter: 11 + $nodeIp = Get-SwisData $swis "SELECT IP_address FROM nodesdata" +           ~~~~~~~~~~~~     + CategoryInfo          : ObjectNotFound: (Get-SwisData:String) [], CommandNotFoundException     + FullyQualifiedErrorId : CommandNotFoundException

Viewing all 2677 articles
Browse latest View live


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