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

Using custom SWQL to search for subnets

$
0
0

Hi there,

 

I notice after using the IPAM 4.3.2, the custom SWQL query is returning multiple results (repeated results). I did a subnet name search (refer to capture 1). It will display 181 results with the same subnet name. In the IP search, it will only return 1 search (refer to capture 2). I the SWQL queries are as below

 

Custom SWQL Query:

SELECT Address, CIDR, FriendlyName as DisplayName, VLAN FROM IPAM.Subnet WHERE CIDR > 0 AND GroupTypeText = 'Subnet';

 

Search SWQL Query:

SELECT Address, CIDR, FriendlyName as DisplayName, VLAN FROM IPAM.Subnet WHERE (Address LIKE '%${SEARCH_STRING}%' OR FriendlyName LIKE '%${SEARCH_STRING}%') AND CIDR > 0 AND GroupTypeText = 'Subnet';

 

Anyone encounter similar issue while using the custom SWQL and how can we solve this issue?

 

Thank you.


SWIS REST/JSON API Authentication alternatives

$
0
0

Hey guys,

 

Currently trying to work all my PS based scripts that were using SWIS Snapin to use REST Api instead, so I don't need to worry about the snapin being installed on workstations.

 

Is there any plan to have alternative authentication method to the API? Current basic schema requires me to type user/password to authenticate. This is not an issue for automated systems where credentials can be save in a secured place. However, when it comes to create small functions for admins to use on daily basis (aka unmanage/remanage), that would require to have either creds hard-coded in the PS script or locally (ugly) or to have the user 'repeating' his current credentials to query Orion. At least OAuth with tokens, for example for a local account, would be a plus.

 

Not sure if this is the best place to ask about future features though

 

Thanks!

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"

 

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.

 

If you find bugs or need a feature in the tools, please open an issue on GitHub: Issues · solarwinds/OrionSDK · GitHub

Bit of help pls?

$
0
0

I am using vRealize and Azure to build Windows servers for my company.  After these boxes are built our help desk would like to have the new servers managed in Orion automatically.  Is there a simple way to add these servers to Orion with a powershell script?  I apologize but I have also never used Orion either. 

 

Thanks

- Bill

Help with SWQL query for alert history

$
0
0

Hello Everyone, I have an SQL query that I am trying to convert to SWQL and I am getting the error "Source entity [Orion.AlertHistory] not found in catalog.  When I compare SQL studio tables to SWQL studio tables I do not see a Orion.AlertHistory table however in SQL studio the table dbo.AlertHistory does exist.  Did I miss something or shouldnt the same tables be present between the two systems?  Below is my query:

 

 

SELECT ADDDATE('HOUR',-7,AlertHistory.[TimeStamp]) as "Time"

      ,AlertObjects.EntityCaption as "Alert"

      ,AlertObjects.RelatedNodeCaption as "Node"

      ,"Details" =

      Case

      When AlertObjects.EntityType = 'Orion.APM.Application' Then 'Application is Down'

      When AlertObjects.EntityType = 'Orion.Nodes' Then 'Node did not respond to ICMP call'

      When AlertObjects.EntityType = 'Orion.NPM.Interfaces' Then 'Interface is down.'

      When AlertObjects.EntityType = 'Orion.Volumes' Then 'Volume has reached a critical threshold'

      Else  'Check Event Log for Details'

      END

  FROM [Orion].[AlertHistory]inner join [Orion].[AlertObjects] on AlertHistory.[AlertObjectID]=AlertObjects.[AlertObjectID]

   where ActionID in

  (SELECT [ActionID]

FROM [Orion].[Actions]

where Title = 'Execute program : C:\Program Files (x86)\Tools\bin\RATriggerAlarm.CMD')

  and TimeStamp > ADDDATE('HOUR',7,DATEADD(DAY,-1,GETDATE())) 

Order by  TimeStamp desc

REST get returns login page

Any way to modify Orion.Credential table (SAM credentials) from SDK?

$
0
0

Looking at a dynamic pw system and would like to investigate updating SAM template credential PW through API.

Thoughts?

XML parser still working?

$
0
0

Hi, we have an XML parser custom written in C#. It connects to the Orion API, retrieves a string, parses it, and populates a SQL table with the results. It was my understanding that the API has switched over from XML to JSON. I am wondering why the parser still works perfectly and if there are any changes upcoming that will cause it to break.

 

I cannot reveal any of the code due to a confidentiality agreement, but there is nothing in it that has anything to do with JSON. Everything is done with XML (XDocument, XElement, XmlTextReader, etc.)


Custom queries not working normally after upgrade from IPAM 4.3 to 4.3.2

$
0
0

Hi all,

 

I have a question on the custom queries. Seems like the custom queries are not working normally after the IPAM upgrade. Did anyone encounter similar issue? I have attached the screenshots on the issue.

 

The custom queries will time out and not show the results. Capture1 show that the queries are not working, capture2 is the SQL query.

 

Thank you

UNMANAGE AN ADMIN DOWN INTERFACE USING SDK

$
0
0

 

Hi all.

 

I have a requirement to stop polling all interfaces for a device which are Admin shut. The option I thought of is to un-manage such interface for a specific time using SDK (powershell script) and execute it using alert manage for all interfaces which admin status as "Down".

 

Need experts help to validate the approach and the SDK code to unmange an interface.

 

Thanks.

Nishant

Orion Platform SWQL, Thwack! Now I got it.

$
0
0

PURPOSE: This is an overly simplified guide for Keep the lights on SQL to Expert SQL users wanting to jump into Solarwinds Query Language (AKA Orion API) as fast as possible.

 

Who can use SWQL?

  • Any user that has web credentials to the web console can use those credentials to run scripts.

 

What is SWQL?

          Orion SWQL or Solarwinds Query Language is a concoction of MS SQL type Elements to create statements and scripts to obtain polled information. Base Example: Select Column from Table

 

Where can Solarwinds Query Language (SWQL) used?

  • API Scripts
  • SWQL Studio, downloaded from Github
  • Custom Query Resource on the Web Console
  • Reporting to filter what is listed in the reports.
  • URL: <solarwindsserver>/Orion/Admin/swis.aspx

 

How can SWQL be used used?

  • Pull/Push data into Orion Platform
  • Alerts

 

Why SWQL, why not the Orion Database Directly?

  • If you update and talk to the database directly, you may have to modify the script to get working again.
  • SWQL statements are designed to not change between versions.
  • Some of the only ways to join data correctly is through SWQL. Certain relationships are not in the Orion DB.

 

Last Note: A lot of this information already exists in multiple places, I am just combining the different points to help provide a better picture to start creating queries easily.

 

SQL Constructs Supported

     SWQL supports the following constructs from SQL:

         Note: If you know MS SQL, this will be exactly the same, except for the table names all start with Orion instead of dbo; however see the that * and Update or Deletes are not possible.

      • SELECT … FROM …
      • WHERE clauses
      • GROUP BY clauses and HAVING clauses
      • ORDER BY clauses
      • INNER JOIN
      • LEFT OUTER JOIN
      • RIGHT OUTER JOIN
      • UNION and UNION ALL
      • SELECT TOP n
      • SELECT DISTINCT
      • Subqueries in SELECT clause
      • Subqueries in FROM/JOIN clauses

 

Aggregate functions:

      • SUM
      • MAX
      • MIN
      • AVG
      • COUNT

 

          Regular functions:

      • ISNULL
      • ABS

 

     Wildcard character in SWQL syntax is: %, * will not work.

          Examples:

      • Starts with: Where Column Like 'Value%'
      • Ends with: Where Column Like '%Value'
      • Contains: Where Column Like '%Value%'

 

          SQL NOT Supported

      • SELECT * FROM Table… (You must list the columns you want to select.)
      • UPDATE, INSERT, DELETE, etc. (You can only use SWQL to read data, and changes can only be done through invoke)

 

Included in the Excel Spreadsheet

   

  • SWIS Examples.
    • Understand all of the different SWQL Functions. If you want to do more than just join a table, this included converting time, check values, and the more basic SQL type commands min,max, average.
  • SWIS Table Reference.
    • Want to know where to find the Node Data or the Applications, Storage or Virtual etc would be within SWQL? This covers the main key reference tables, the identifier id, and how to reference it up the chain from Component to Application to Node to Engine.
    • Some of this information came from Orion.NetObjectTypes. SWIS Parent and Column Details were added to see the relationship to the next table.
    • This section will be continuously updated. The main Core modules are currently mapped, and others are still being finalized.
  • Filtering by Status
    • Want to know what all of the 20+ Device and other Statuses and how convert from an ID to a human readable status? This tab is just for you. This can be referenced in Orion.StatusInfo

Bit of help pls?

$
0
0

I am using vRealize and Azure to build Windows servers for my company.  After these boxes are built our help desk would like to have the new servers managed in Orion automatically.  Is there a simple way to add these servers to Orion with a powershell script?  I apologize but I have also never used Orion either. 

 

Thanks

- Bill

Orion SDK with PowerShell - manage/unmanage multiple nodes

$
0
0

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

 

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

 

Thanks for any advice you have!

Custom Query to display Muted Nodes with SAM 6.4

$
0
0

Hi,

I am looking to build out a custom query resource view for this.

 

Do you know which table contains the muted nodes information?  I checked the orion.mantenance table and there's no info displayed, even when I have muted the nodes. 

 

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


CAN ANYONE SUPPLY PYTHON EXAMPLES OF HOW TO PULL DATA OUT OF IPAM

$
0
0

I am new to the Solarwinds SDK.  We are wanting to pull data out of IPAM to use in other applications.  We are able to pull a single subnet so I'm sure it something simple were missing.  I have reviewed the SDK examples but there does not seem to be anything specific to IPAM.  Does anyone have example python scripts or links?  Thanks in advance!

API to import and export application monitor templates

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.

Powershell - get-swisdata

$
0
0

Trying to get a handle on this....I want to work with unmanaging one node, and trying to get the nodeID using something like below.

This is in the testing phase, trying to get handle on the PS commands from SDK

I can get a list from:

get-swisdata $swis "SELECT NodeID, Caption FROM Orion.Node"

 

I am trying to test using one node named - dtcorp20013.  Thought I could use:

get-swisdata $swis "SELECT NodeID, Caption FROM Orion.Nodes Where Caption like dtcorp20013"

I tried using a variable and got the same error message below....

 

But I get an error:

Get-SwisData : Cannot resolve property dtcorp20013

At line:1 char:13

+ get-swisdata <<<<  $swis "SELECT NodeID, Caption FROM Orion.Nodes Where Caption like dtcorp20013"

    + CategoryInfo          : InvalidOperation: (:) [Get-SwisData], FaultException`1

    + FullyQualifiedErrorId : SwisError,SwisPowerShell.GetSwisData

 

Any thoughts, is there more detailed documentation on the commands, properties, etc (anything along the lines of SS64?)

Creating Dependencies through Orion SDK

$
0
0

Hello @Tdanner,

 

I'm currently using Powershell to create dependencies using groups created through REST. Are there any plans (or any other method) to allow the creation of dependencies through REST?

I prefer using REST as I get a response which is much easier to rely on from an automation standpoint. I've tried using firebug (web development tool) to watch for any HTTP POSTs going on in the background, I even tried to put the information services in debug to see what was going on behind the scenes and no dice. I did find this however:

 

2017-04-13 08:50:12,740 [45] DEBUG SolarWinds.InformationService.Core.IndicationLogger - (null) (null)  Indication System.InstanceCreated reported:

  Source instance properties:

    DependencyId = 247011

    Name = testsite(TEST) WAN Devices dependency

    ParentUri = swis://MYORIONINSTANCE/Orion/Orion.Groups/ContainerID=536

    ChildUri = swis://MYORIONINSTANCE/Orion/Orion.Groups/ContainerID=537

    AutoManaged = False

    ParentEntityType = Orion.Groups

    ParentNetObjectID = 536

    ChildEntityType = Orion.Groups

    ChildNetObjectID = 537

    InstanceType = Orion.Dependencies

    Uri = swis://MYORIONINSTANCE/Orion/Orion.Dependencies/DependencyId=247011

 

Looks similar to the values being used in powershell - wondering if I can REST as outlined in the Orion SDK "Create Request" =  https://localhost:17778/SolarWinds/InformationService/v3/Json/Create/Orion.Dependency ??

 

Thank you,

 

=swql

 

 

 

Viewing all 2677 articles
Browse latest View live


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