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

powershell script to search node and delete

$
0
0

Please note that this script was based on this thwack message.

All I did was to change the swsql query used to get the URI and to search and delete a node via PowerShell

 

# This script will search for  node and delete it if exists

#

################################## Attention ###############################################

# You must have Orion SDK installed and set-execution policy must be set to unrestricted!!#

#Before running you must setup your hashed encrypted password using the line below.       #

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

 

#### Prerequisites ###

#  run the line below save credentials to be used by this script on a encrypted file

#GET-CREDENTIAL –Credential "EnterTheOrionUserNamehere” | EXPORT-CLIXML C:\Scripts\SecureCredentialsSAM.xml

## Load the SolarWinds Powershell snapin.

##Needed in order to execute the script.

##Requires the Orion SDK 2.0 installed on the machine this script is running from.

Add-PSSnapinSwisSnapin

# SolarWinds username and password section.

# It is recommended to use a local account create within SAM with only. I strongly recommend that you don't use a MS local account or domain account.

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

#This is using the hashed encrypted password

$MyCredentials=IMPORT-CLIXMLC:\Scripts\SecureCredentialsSam.xml

$ORIONSERVERNAME= 'yourserver.domain.com'

#This is connecting to SAM to pull the info we need need with the info given

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

$nodename=read-host"Enter node Name"

$nodeuri=Get-SwisData$swis"SELECT Uri FROM Orion.Nodes WHERe NodeName LIKE '%$nodename'"

if (!$nodeuri) {Write-Host"node does not exist on SAM"}

if ($nodeuri) {

Write-Host"node exist, uri: $nodeuri"

Remove-SwisObject$swis$nodeUri

Write-Host"node has been removed"

}


Orion SDK 2.2 released

$
0
0

Orion SDK 2.2 has been released. The main feature in this release is smart autocomplete in SWQL Studio, but there are also various minor bugfixes and improvements.

 

You can download the installer from GitHub: Release v2.2.54 · solarwinds/OrionSDK · GitHub

You can also install it from Chocolatey (Chocolatey Gallery | SolarWinds Orion SDK 2.2.54 ) using "choco install orionsdk"

 

Documentation is on the GitHub wiki: Home · solarwinds/OrionSDK Wiki · GitHub

 

These tools are compatible with all of the same SolarWinds products that the previous release was, so you should have no fear of upgrading. On the other side, Orion SDK 2.1 and several previous releases are compatible with the latest 2017 SolarWinds products, so don't feel like you need to upgrade the Orion SDK just for compatibility.

 

As always, you can ask your Orion SDK questions in this forum. If you see a bug in the SDK tools, feel free to open an issue on the GitHub project: Issues · solarwinds/OrionSDK · GitHub.

How to enable API in Solarwinds to integrate with other tools?

$
0
0

Hi,

 

We are trying to create a “Central Dashboard for Capacity” related reports for my customer so that whenever needed one can login to this Tool and generate a report.

 

To generate those reports in our Tool, our Tool needs to further integrated with Solarwinds to get the Capacity and Performance related data. And API (Web services) is the only protocol that our Tool support.

 

We need your help to understand whether Solarwinds support API so that we can explore further to get the Capacity and Performance related data from Solarwinds.

 

Also, how we can enable API Integration.

SWIS discover Interface Error

$
0
0

Hi,

We're getting an error when we discover interface with swis.

 

I got this error message, "Exception of type 'SolarWinds.ApiProxyFactory.TransientApiProxyException' was thrown."

 

 

Why got this message?

 

Platform version:

Orion Platform 2017.1, IPAM 4.3.2, NPM 12.1, VIM 7.0.0, NetPath 1.1.0, QoE 2.3, NTA 4.2.2

 

2017-05-23_12-27-58.png

Query nodes based on custom property

$
0
0

Hello,

 

Is there any way to query the Orion nodes with all the custom properties?

 

Thanks.

CluM09

powershell script to search node and delete

$
0
0

Please note that this script was based on this thwack message.

All I did was to change the swsql query used to get the URI and to search and delete a node via PowerShell

 

# This script will search for  node and delete it if exists

#

################################## Attention ###############################################

# You must have Orion SDK installed and set-execution policy must be set to unrestricted!!#

#Before running you must setup your hashed encrypted password using the line below.       #

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

 

#### Prerequisites ###

#  run the line below save credentials to be used by this script on a encrypted file

#GET-CREDENTIAL –Credential "EnterTheOrionUserNamehere” | EXPORT-CLIXML C:\Scripts\SecureCredentialsSAM.xml

## Load the SolarWinds Powershell snapin.

##Needed in order to execute the script.

##Requires the Orion SDK 2.0 installed on the machine this script is running from.

Add-PSSnapinSwisSnapin

# SolarWinds username and password section.

# It is recommended to use a local account create within SAM with only. I strongly recommend that you don't use a MS local account or domain account.

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

#This is using the hashed encrypted password

$MyCredentials=IMPORT-CLIXMLC:\Scripts\SecureCredentialsSam.xml

$ORIONSERVERNAME= 'yourserver.domain.com'

#This is connecting to SAM to pull the info we need need with the info given

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

$nodename=read-host"Enter node Name"

$nodeuri=Get-SwisData$swis"SELECT Uri FROM Orion.Nodes WHERe NodeName LIKE '%$nodename'"

if (!$nodeuri) {Write-Host"node does not exist on SAM"}

if ($nodeuri) {

Write-Host"node exist, uri: $nodeuri"

Remove-SwisObject$swis$nodeUri

Write-Host"node has been removed"

}

How to find out what items are in a group through SWQL

$
0
0

I am currently trying to find out what items are in various groups using the SDK. I want to know what nodes are in a given group so I can use the sdk to add another node if needed. I can not however find a table that shows me this information. Any help would be appreciated!

NCM - DOWNLOAD THE LATEST CONFIG INFO FOR ALL DEVICES

$
0
0

Hello,

I would like to be able to find a way where i can download all the latest config file for all devices of the same type. Eg latest config file for all cisco devices.

I was hoping if i can pull all the information and provide one output separating each device by IP or node name. I wanted to be able to do a monthly or weekly audit for all the config information for these devices.

For each devices i want to get the Interface name, interface description, vlans, rate limit, switchport info that is in the config file for each IP address or node name in a tabular Format.

 

Is it possible the SDK can do this?

I'm new to NCM and also the ORION SDK.tdanner

 

Something like the example below

IP Address          interface name       interface description       rate limit          switchport

10.xx.xx.xx          gigabitethernet1     Internet Link                     510000          access vlan 704   

 

 




Adding multiple filters to the group member definition ?

$
0
0

We are creating Groups using REST Api and Powershell. The groups are getting created but there is a problem.@@

 

How can i include 2 conditions in a single dynamic query. I know that i can include multiple dynamic queries, but when i include multiple queries they become OR condition.

Like when i create member as this snippet

$members = @(

                    @{ Name = "$city City Node"; Definition = "filter:/Orion.Nodes[CustomProperties.City='Austin']" },

                    @{ Name = "$city Node Dependency"; Definition = "filter:/Orion.Nodes[CustomProperties.Dependency_BreakDown='Edge_Parent']" }                    

    )

 

It will create two different dynamic queries.

But i want to create a single dynamic query such as the City for the Node must be Austin AND Dependency_BreakDown must be Edge_Parent

 

Any help would be appreciated

tdannermesverrum

Orion SDK 2.2 released

$
0
0

Orion SDK 2.2 has been released. The main feature in this release is smart autocomplete in SWQL Studio, but there are also various minor bugfixes and improvements.

 

You can download the installer from GitHub: Release v2.2.54 · solarwinds/OrionSDK · GitHub

You can also install it from Chocolatey (Chocolatey Gallery | SolarWinds Orion SDK 2.2.54 ) using "choco install orionsdk"

 

Documentation is on the GitHub wiki: Home · solarwinds/OrionSDK Wiki · GitHub

 

These tools are compatible with all of the same SolarWinds products that the previous release was, so you should have no fear of upgrading. On the other side, Orion SDK 2.1 and several previous releases are compatible with the latest 2017 SolarWinds products, so don't feel like you need to upgrade the Orion SDK just for compatibility.

 

As always, you can ask your Orion SDK questions in this forum. If you see a bug in the SDK tools, feel free to open an issue on the GitHub project: Issues · solarwinds/OrionSDK · GitHub.

NCM - DOWNLOAD THE LATEST CONFIG INFO FOR ALL DEVICES

$
0
0

Hello,

I would like to be able to find a way where i can download all the latest config file for all devices of the same type. Eg latest config file for all cisco devices.

I was hoping if i can pull all the information and provide one output separating each device by IP or node name. I wanted to be able to do a monthly or weekly audit for all the config information for these devices.

For each devices i want to get the Interface name, interface description, vlans, rate limit, switchport info that is in the config file for each IP address or node name in a tabular Format.

 

Is it possible the SDK can do this?

I'm new to NCM and also the ORION SDK.tdanner

 

Something like the example below

IP Address          interface name       interface description       rate limit          switchport

10.xx.xx.xx          gigabitethernet1     Internet Link                     510000          access vlan 704   

 

 



How to find out what items are in a group through SWQL

$
0
0

I am currently trying to find out what items are in various groups using the SDK. I want to know what nodes are in a given group so I can use the sdk to add another node if needed. I can not however find a table that shows me this information. Any help would be appreciated!

Orion SDK 2.2 released

$
0
0

Orion SDK 2.2 has been released. The main feature in this release is smart autocomplete in SWQL Studio, but there are also various minor bugfixes and improvements.

 

You can download the installer from GitHub: Release v2.2.54 · solarwinds/OrionSDK · GitHub

You can also install it from Chocolatey (Chocolatey Gallery | SolarWinds Orion SDK 2.2.54 ) using "choco install orionsdk"

 

Documentation is on the GitHub wiki: Home · solarwinds/OrionSDK Wiki · GitHub

 

These tools are compatible with all of the same SolarWinds products that the previous release was, so you should have no fear of upgrading. On the other side, Orion SDK 2.1 and several previous releases are compatible with the latest 2017 SolarWinds products, so don't feel like you need to upgrade the Orion SDK just for compatibility.

 

As always, you can ask your Orion SDK questions in this forum. If you see a bug in the SDK tools, feel free to open an issue on the GitHub project: Issues · solarwinds/OrionSDK · GitHub.

SWIS discover Interface Error

$
0
0

Hi,

We're getting an error when we discover interface with swis.

 

I got this error message, "Exception of type 'SolarWinds.ApiProxyFactory.TransientApiProxyException' was thrown."

 

 

Why got this message?

 

Platform version:

Orion Platform 2017.1, IPAM 4.3.2, NPM 12.1, VIM 7.0.0, NetPath 1.1.0, QoE 2.3, NTA 4.2.2

 

2017-05-23_12-27-58.png

SwisPowerShell module released

$
0
0

You can now use a PowerShell module to access Orion and SWIS. To install it from the PowerShell Gallery, run this command:

 

Install-Module SwisPowerShell

 

To load it into the current PowerShell session, run this command:

 

Import-Module SwisPowerShell

 

Documentation for this module is provided on GitHub: https://github.com/solarwinds/OrionSDK/wiki/PowerShell

 

This module provides the same cmdlets as the old PowerShell snapin, SwisSnapin. Existing scripts will work with the module with no changes other than replacing "Add-PSSnapin SwisSnapin" with "Import-Module SwisPowerShell". The OrionSDK.msi installer still provides SwisSnapin for compatibility.


Orion SDK 2.2 released

$
0
0

Orion SDK 2.2 has been released. The main feature in this release is smart autocomplete in SWQL Studio, but there are also various minor bugfixes and improvements.

 

You can download the installer from GitHub: Release v2.2.54 · solarwinds/OrionSDK · GitHub

You can also install it from Chocolatey (Chocolatey Gallery | SolarWinds Orion SDK 2.2.54 ) using "choco install orionsdk"

 

Documentation is on the GitHub wiki: Home · solarwinds/OrionSDK Wiki · GitHub

 

These tools are compatible with all of the same SolarWinds products that the previous release was, so you should have no fear of upgrading. On the other side, Orion SDK 2.1 and several previous releases are compatible with the latest 2017 SolarWinds products, so don't feel like you need to upgrade the Orion SDK just for compatibility.

 

As always, you can ask your Orion SDK questions in this forum. If you see a bug in the SDK tools, feel free to open an issue on the GitHub project: Issues · solarwinds/OrionSDK · GitHub.

Can any one supply a REST example of how to define a Node in Solarwinds

$
0
0

I am developing an integration agent for SolarWindws and would like to use the REST API to add nodes to SolarWindws and change the system name

When can SWQL refer to an Alias

$
0
0

I'm trying to parse strings and am trying to refer to an alias in the SWQL query.

 

In the following query, I can refer to the alias IP without issue.  However, the alias from the CHARINDEX expression gives an exception: Cannot resolve property P1.

 

SELECT N.IPAddress AS IP

     , N.DnsBackward

     , CHARINDEX('.',IP,1)-1 AS P1

     , ToString(P1)

FROM IPAM.IPNode AS N

 

Is this a bug?  If not, what determines when an alias can be referenced?  Is there another way to accomplish this?

SWQL Single Character Wildcard / String Parsing

$
0
0

Does SWQL have a single character wildcard?  I've been working with the SDK for a while and find string parsing to be the greatest difficulty.

 

I'm still trying to find a way to work around for the lack of IP Address sorting.  SWQL functions for IP Addresses

https://thwack.solarwinds.com/ideas/10592

 

I generally find I need REGEX pattern matching MySQL :: MySQL 5.7 Reference Manual :: 3.3.4.7 Pattern Matching and a bunch of string functions MySQL :: MySQL 8.0 Reference Manual :: 12.5 String Functions that just don't exist.

 

How do people generally accomplish what is needed using only SubString and CharIndex?

 

Nesting of these functions doesn't appear to work...

    SELECT N.IPAddress AS IP

         , N.DnsBackward

         , SUBSTRING( IP

                    , 1

                    , CHARINDEX('.',IP,1)-1) AS O1

         , SUBSTRING( IP

                    , CHARINDEX('.',IP,1)+1

                    , CHARINDEX('.',IP,CHARINDEX('.',IP,1))-1) AS O2

         , SUBSTRING( IP

                    , CHARINDEX('.',IP,CHARINDEX('.',IP,1))+1

                    , CHARINDEX('.',IP,CHARINDEX('.',IP,CHARINDEX('.',IP,1)))-1) AS O3

         , SUBSTRING( IP

                    , CHARINDEX('.',IP,CHARINDEX('.',IP,CHARINDEX('.',IP,1)))+1

                    , CHARINDEX('.',IP,CHARINDEX('.',IP,CHARINDEX('.',IP,CHARINDEX('.',IP,1))))-1) AS O4

    FROM IPAM.IPNode AS N

When can SWQL refer to an Alias

$
0
0

I'm trying to parse strings and am trying to refer to an alias in the SWQL query.

 

In the following query, I can refer to the alias IP without issue.  However, the alias from the CHARINDEX expression gives an exception: Cannot resolve property P1.

 

SELECT N.IPAddress AS IP

     , N.DnsBackward

     , CHARINDEX('.',IP,1)-1 AS P1

     , ToString(P1)

FROM IPAM.IPNode AS N

 

Is this a bug?  If not, what determines when an alias can be referenced?  Is there another way to accomplish this?

Viewing all 3719 articles
Browse latest View live