I am using the Perl interface example for the SWQL access.
I am trying to run a query against the Orion.ResponseTime table, here is what the query looks like:
SELECT NodeID, DateTime, Archive, AvgResponseTime, MinResponseTime, MaxResponseTime, PercentLoss, Availability
FROM Orion.ResponseTime
WHERE NodeID = 28
AND DateTime = (SELECT max(DateTime) as DT
FROM Orion.ResponseTime
WHERE NodeID = 28 AND Availability < 50)
AND Availability < 50
This Query runs perfectly SWQL Studio, but when I put it into the Perl script and do the call using the $swis->QueryXml( $sql, {} );
It fails completely. I have narrowed the problem down to the < and > symbols which are passed through SOAP and are translated into < and > when being passed.
I even tried to utilize "BETWEEN 0 AND 50" and but the SWQL does not recognize the BETWEEN command. I even tried replacing the < and > with LT and GT, and even tried to use < and >. I also tried to wrap the sql in $sql = "<![CDATA[$sql]]>"; with no success.
Does anyone have any other solutions that work?
Attached is the exact message I am receiving.
Thank you,
Charles
Solved! Go to Solution.
Here's an updated version of InformationService.pm that fixes this issue.
Here's an updated version of InformationService.pm that fixes this issue.
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 150,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.