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

Problem when using "CreateApplication" verb with SAM

$
0
0

Dear Sir or Madam -

 

We are using the "CreateApplication" verb in Powershell to add an application in SAM (version 6.0).  The application is created successfully.   The script then pauses for 7 seconds, then creates the next application, etc.  In total, 530 applications were created.  Each application has two SNMP Monitor components.

 

The first few applications that were created worked fine, but the majority of the components were hung in the  "Initial poll in progress"  state.  Since we've encountered that problem before, we used the procedure provided by support to correct the issue (re-install CollectorInstaller.msi, JobEngine.msi, and JobEngine.v2.msi).   After following that procedure, all applications were working fine.

 

How can we avoid this problem ?   Should we wait longer after creating each application ?   If so, how long ?

 

Thank you.

 

James Troy


Is it possible to programmatically create custom components in SolarWinds APM?

$
0
0

I need to create multiple custom components to monitor state of several JMX objects exposed by a node running our Java application. These objects may appear and disappear with time.

Adding nodes and application(without template) works(with minor problems).

But when I try to create new Orion.APM.Component record, I get error: "Access to Orion.APM.Component denied."

My code is based on the default example for Java.

SWIS API v3 seems to poll wrong data.

$
0
0

Hey everyone,

 

I'm working on a dashin.io widget and want to display information about node CPU usage. I am running into a weird problem where the API seems to grab PercentMemoryUsed or AvgResponseTime instead of CPULoad. Take a look at this set of nodes in my database:

 

dbmanager.png

And in SWQL studio (using v3 over https)...

swqlv3.png

You can see that CPULoadThreshold.CurrentValue matches up with PercentMemoryUsed on nodes 8,176,190,194,259,273, AvgResponseTime on nodes 27,52, and is correct for nodes 196 and 232.

 

If I connect SWQL studio with v2 over https instead of v3, I get the following results using the exact same query:

swqlv2.png

So, only the two nodes with correct information are shown. This data also lines up with what is shown in the web console.

 

Anyone have any idea how to fix this?

API for adding and configuring nodes?

$
0
0

Disclaimer: I have never worked with and I know nothing about the Orion API.

 

Currently adding nodes to Orion takes a significant amount of time for us.  How much of the process of adding and configuring nodes in Orion can be done via the API?

The NPM database is flooding our SQL Trace Logs with this error 50 times a second: DBCC TRACEON 3604, server process ID (SPID) 77. This is an informational message only; no user action is required. How can we make it stop?

$
0
0

This is a new install of the latest version of NPM with its SQL DB installed on a separate 2014 SQL server. Is there a way to stop this message through making a change on the NPM server?

Can we create custom SWQL chart on view

$
0
0

Can we create custom SWQL chart on view ?

 

We can create Custom SWQL table on Nodes View like below.

 

Please help me to create such chart, I want to create custom CPU,memory chart.

SWQL Query resource - gives error in website but works in studio

$
0
0

I am trying to get info from this query which works in studio but breaks in webpage...I think because of the where ...(select) statement

SELECT de.ComponentStatusID, de.ColumnSchemaID, de.ColumnType, de.ColumnName, de.MaxNumericData, (SELECT StringData FROM Orion.APM.DynamicEvidence WHERE ComponentStatusID=de.ComponentStatusID and ColumnName=de.ColumnName and columnType=0 and (StringData NOT LIKE '0' and StringData is not NULL) ) as StringData FROM Orion.APM.DynamicEvidence de WHERE de.ComponentStatusID  IN (SELECT top 1 ID FROM Orion.APM.ComponentStatus where ComponentID=27154 order by TimeStamp desc) and Columntype=1

How do I best get the "last component status ID" from one table and apply to where clause of select on another table for the web?

SAM 6.2 problem - add a node via SDK but no custom properties

$
0
0

Dear Sir or Madam -

 

For years, we have been creating our nodes via a Powershell script.   Also, we have custom properties defined for our nodes.  We recently upgraded our test Orion environment to SAM 6.2, while our production environment still runs SAM 6.1.1.

 

Under SAM 6.1.1, when a node is created via "New-SwisObject", Orion creates a record in "Orion.Nodes" and "Orion.NodesCustomProperties" for the new node. 

 

Under SAM 6.2, the record in "Orion.NodesCustomProperties"  is not created.   The code which attempts to set the property values runs without error, but it does nothing as there is no record to update.

 

Under SAM 6.2, are we now required to create the record in "Orion.NodesCustomProperties"  ourselves ?   How do we create it ?

If not, this appears to be a defect.

 

Here is a simple example that can be run under SAM 6.1.1 and 6.2 to illustrate the different results -

 

$node_props                     = @{}

$node_props.EntityType          ="Orion.Nodes"

$node_props.IPAddress           ="10.1.2.3"

$node_props.IPAddressGUID       ="90000000-0000-0000-0000-010001002003"

$node_props.Caption             ="host-name"

$node_props.DynamicIP           =$False

$node_props.Status              =1

$node_props.UnManaged           =$False

$node_props.Allow64BitCounters  =$False

$node_props.SysObjectID         =""

$node_props.MachineType         =""

$node_props.VendorIcon          =""

$node_props.PollInterval        =   60

$node_props.RediscoveryInterval =1440

$node_props.StatCollection      =   5

$node_props.CPULoad             =-2

$node_props.MemoryUsed          =-2

$node_props.PercentMemoryUsed   =-2

$node_props.ObjectSubType       ="ICMP"

$node_props.SNMPVersion         =0

$node_props.Community           =""

$node_props.EngineID            =1

 

$node_uri=New-SwisObject$swis  –EntityType"Orion.Nodes"  –Properties$node_props

 

$cp_uri=$node_uri+"/CustomProperties"

 

$node_props                   = @{}

$node_props.a_custom_property ="some data"

 

Set-SwisObject$swis  -uri$cp_uri  -properties$node_props

 

 

Thank you.

 

James Troy


NTA 4.0 Entity Model

$
0
0

At NTA 4.0 Entity Model · solarwinds/OrionSDK Wiki · GitHub bottom of the page is the following query

 

-- query top 10 IP conversations in the first hour of the year 2014

SELECT TOP 10f.SourceIP, f.DestinationIP, SUM(f.Bytes) as TotalBytes

FROMOrion.Netflow.FlowsByConversation f

WHEREf.TimeStamp>'2014-01-01 00:00:00'ANDf.TimeStamp<='2014-01-01 01:00:00'

GROUP BYf.SourceIP, f.DestinationIP

ORDER BYSUM(f.Bytes) DESC


When I run this (changing the date and number of top conversations to report naturally) to match the report generated on the Orion web interface "NetFlow Conversations Summary", I do not get similar results.  Some of the flows are close enough (within rounding errors) but others are way off, some are not reported .


Is my theory that I should be able to match (and validated) the SQL in this manner valid?


Thanks


Orion.Netflow.Applications

$
0
0

In Orion.Netflow.Flows is ApplicationID, which is an key into Orion.Netflow.Applications.

 

ApplicationID acts as the source port, correct, with additional information?

 

How does one interpret ApplicationID that equals 0?

How does one interpret ApplicationID that equals 100001 ("Unmonitored traffic")?

 

Thanks

error: Server error: Error: A query to the SolarWinds Information Service failed.

$
0
0

Greetings!

I added Resource to newly created page and wanted to customize DB query to narrow down Resource content. Essentially, I want to be able to separate or filter it by Component Monitor Name. I found simple query but it returns with below error. Query: Monitor.Name like  'zpool health'

 

'Server error: Error: A query to the SolarWinds Information Service failed.'

 

 

I found relevant article in KB which suggests changing 'Maximum number of data series displayed on chart' under Web Console Settings but it does not make any effect.

 

Any thoughts / suggestions very much appreciated!

Is it possible to add subnets to Discovery automatically, when we use the subnet from IPAM?

$
0
0

Hello,

I have an issue with Discovery. I really want to add devices automatically in Discovery process, when we use a device for the first time. For instance, there is a subnet in IPAM, and I use it for the first time. I assign an IP address to my device, but there is no such subnet in Discovery. Then I just forget about this device and I don't discover it. As a result, I lost my device.

SO, my question is: Is it possible to add subnets from IPAM to Discovery process?

How do you set the hostname via http POST in IPAM?

$
0
0

My question is pretty much the same as in this thread:

 

https://thwack.solarwinds.com/thread/68357

 

I'm trying to set the hostname with a POST in curl (specifically pyCurl) but I'm coming up with nothing.  I can successfully mark an IP as used or available by submitting:

 

objectId=3923&ids=128&entity=IPAM.IPNode&verb=UpdateManyStatus&ipstatus=1

 

What are the variables I need to set so I can set things like hostname, alias and comment?

 

It is surprisingly difficult to find adequate documentation for this product.  Where are ids, objectid, entity, verb and ipstatus documented?  I suspect if I can find that I can find other things to set.

 

Thanks!

PowerShell script to modify Custom Property via Rest API/JSON

Orion SDK 2.0 released on GitHub

$
0
0

A few months ago we put the source code for the Orion SDK on GitHub under the Apache 2.0 license, including the SWQL Studio and SwisSnapin (PowerShell) tools and the samples and documentation. Today I am taking the "Beta" label off of the tools built from that source, so this now the 2.0 release of the Orion SDK. You can download the installer from Release v2.0.50 · solarwinds/OrionSDK · GitHub.

 

The installer no longer includes the documentation. That is now hosted on the GitHub wiki: Home · solarwinds/OrionSDK Wiki · GitHub. This way we can update at will in response to new issues or new questions and you can always have the latest docs without waiting for us to test and release a new numbered version of the SDK.

 

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.


Orion SWQL, Thwack! Now I got it

$
0
0

Orion SWQL or Solarwinds Query Language is a pseudo SQL type statements. If you know the basic structure of SQL, Select from join where order group by, you will easily pickup SWQL queries.

 

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

 

Where is SWQL used?

  • Every Web Resource on the Web Console
  • Alerts
  • Reports
  • SDK/API scripting

 

Why should I use SWQL?

    Solarwinds has designed SWQL to be future proofed for users and development.

 

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

 

Common 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 the SELECT clause
  • Subqueries in the FROM/JOIN clauses

  SWQL supports the following aggregate functions:

  • SUM
  • MAX
  • MIN
  • AVG
  • COUNT

  SWQL supports the following regular functions:

  • ISNULL
  • ABS

  Wildcards - 

The wildcard character in SWQL syntax is: %

Example: Node.Caption Like 'AX3%'

  Common SQL Constructs Not Supported

SWQL does not support the following common SQL constructs:

Note: You must use CRUD operations to create, read, update, or delete entities.

  • SELECT * FROM … (You must list the actual properties you want to select.)
  • UPDATE, INSERT, DELETE, etc. (You can only use SWQL to read data.)

 

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

WHD Rest API to get Ticket

$
0
0

Hello THWACK,

 

I would like to get ticket details for an client that includes custom fields as shown below:

whd.png

 

I am trying to fetch ticket details using below URL but getting only few fields, and none from the above.

https://whd.mulkeyinc.com/helpdesk/WebObjects/Helpdesk.woa/ra/clientInterface/Tickets?sessionKey=wVfNOc2qIuLnISF9IXwLPg

 

Getting Output as:

[{"id":21,"type":"Ticket","lastUpdated":"2015-11-04T12:21:29Z","shortSubject":null,"shortDetail":null,"displayClient":"Test User","prettyLastUpdated":"1 day ago","latestNote":null}]

 

Can you please help me to get all such custom fields through REST APIs in an Javascript?

 

Thanks

Kanwar

SWQL Query works in SWQL Studio but not Online

$
0
0

I'm fairly new to SWQL and SQL but was able to build this query in SWQL Studio in preparation to moving it over to the web report builder but when I copied it over into the web report builder I get an error stating that it is an invalid query.

Following is the query:

 

select n.dns,

(select count(p.Speed) as sp1

  from orion.udt.port p

  where p.nodeid=n.nodeid

  and p.speed = 10000000000) as Port_Total,

(select count(p.Speed) as sp2

  from orion.udt.port p

  where p.nodeid=n.nodeid

  and p.speed = 10000000000

  and p.operationalstatus=1) as Port_Active

from orion.nodes n

where n.dns like 'r1-%'

or n.dns like 'r2-%'

or n.dns like 'wr-%'

or n.dns like 'cr-%'

order by n.dns

 

Any help on this would be much appreciated.

Getting very odd results with SWQL query when put in a resource on a web page?!

$
0
0

Playing around with an idea to have a simple custom search by user-id from UDT data that I can put on a web page.  The query itself works great in SWQL studio, but when I put it on a webpage I get very odd results compared to what I get when I run it in SWQL studio...

 

The base query is fairly simple:

 

SELECT TOP 100 U2IPAC.User.AccountName, LogonDateTime, IPAddress, ('/Orion/UDT/UserDetails.aspx?NetObject=UU:' + ToString(UserID)) AS [_LinkFor_AccountName]

FROM Orion.UDT.UserToIPAddressCurrent U2IPAC

ORDER BY LogonDateTime DESC

 

I've also put in a "search" query that appears to work fine.  I've included it and how I set up the resource below.  This resource I added to my main UDT page.

 

When I run the query above in SWQL studio it works exactly as I would think it would.  Returns a number of userID's, IP Addresses, etc. etc for users that UDT says has recently logged in.   However, when I put it into the web page as shown below, the results are all 1 username.  I did notice that the "UserID" variable in the Orion.UDT.User happens to have the value of "1" for this user.   The dates and times and IP addresses that are returned on the webpage for that user ID are all valid, but its missing some.

 

By "missing some" I mean exactly that.   If I rewrite the query above to give me the logins of that specific username with a "WHERE U2IPAC.User.AccountName LIKE '%userid%'", I get a list of the last 100 logins of that user.   However, what is returned when I have it on the webpage is missing the first 2 from that list, then it has the next 2, then its missing the next 3, then it has the rest...   I've tried everything I can think of to try and figure out why its doing this.  Any suggestions? 

 

Is something happening to my query that I don't know about?   Is it somehow filtering or restricted on "UserID = 1"?  

 

## Search Query

SELECT TOP 1 U2IPAC.User.AccountName, LogonDateTime, IPAddress, ('/Orion/UDT/UserDetails.aspx?NetObject=UU:' + ToString(UserID)) AS [_LinkFor_AccountName]

FROM Orion.UDT.UserToIPAddressCurrent U2IPAC

WHERE (U2IPAC.User.AccountName LIKE '%${SEARCH_STRING}%')

ORDER BY LogonDateTime DESC

 

UDTUserSearch.jpg

Running reports via API

$
0
0

Is there currently a way to run any reports in Solarwinds using the API and export as CSV to a specific location?  I want to build a script that takes data from the CSV and manipulates it but would rather not have to go into Solarwinds report manager each time I need an updated version of the report, and would like to run the report with a simple API call.  I did a search but found something from over a year ago stating that it was not supported, but was wondering if anything has changed within that time period. Thanks!

Viewing all 2677 articles
Browse latest View live


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