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

Need to do a select on a GUID datatype using SWIS .. not having much success

$
0
0

I am doing some integration work with our back end ticketing system for our support teams.

 

This integration step will implement ticket auto-closure .. so that when an advanced alert is cleared .. then the Solarwinds server will signal to corresponding ticketing system to close the associated ticket.

 

I already have the first part of this working using the Powershell examples of SWIS using the AddNote method on the Orion.AlertStatus object to stuff data about the ticket receipt from the ticketing system.

 

So now when a ticket is opened I now have a record in Solarwinds of what the corresponding ticket in my ticketing system is.  All good .. now the difficult part.

 

The SELECT statement to go back into the Orion.AlertStatus and get the receipt out of the alert would be :

 

SELECT Notes FROM Orion.AlertStatus WHERE ObjectType = 'Node' AND ActiveObject = 9 AND AlertDefID = '68C0553A-1303-41BA-924F-07D1C4CE5A98'

 

Except, this doesn't work if I add the "AND AlertDefID = '68C0553A-1303-41BA-924F-07D1C4CE5A98'" .. and I know why ... because the PK Field AlertDefID is not a string but in fact a System.Guid datatype.

 

How do I do a SWIS select statement and search on this non-string datatype?

 

I do have the option of brute forcing this and simply doing the --- WHERE ObjectType = 'Node' AND ActiveObject = 9   --- and then just walk though the result set that comes back, but I'd prefer to do this work with TSQL/SWIS if possible.

 

Does anyone have any examples of working in the confines of SWIS with the System.Guid datatype?

 

Thanks for any help,

 

Gerald


Viewing all articles
Browse latest Browse all 3719

Trending Articles



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