cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post

How to retrieve time series data for a specified time range using SWQL/SWIS API Queries

Hi All,

First of all many Thanks for trying to help me out here. I have a requirement to pull out Performance Metric Time series data from SolarWinds Orion NPM Module's SWIS API Capability, for which we designed the SWQL and tacked it on along with the SWIS API Application context in the URL. It works as well, we are getting JSON responses for the same. But the problem we have run into is we are not able to figure out how to add that filtering criterion to specify a specific time range for which to pull the data out. For eg:- If I need Node Availability Data ( Polling/Sampling @ 2 mins ) to be pulled from 18th October 2017 0420 hrs to 24th October 2017 2350 hrs. Provided below are the APIs calls we have come up with so far


Node Availability

https://hostname:17778/SolarWinds/InformationService/v3/Json/Query?Query=SELECT+A.NodeID+,+B.caption...)


Node Response time

https://hostname:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+X.AvgResponseTime+,+...

Avg. CPU Load

https://hostname:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+X.AvgResponseTime+,+...

Percent Memory Used

https://hostname:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+X.AvgResponseTime+,+...

Interface bandwidth utilization

https://hostname:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+Y.NodeID+,+X.Interfa...

One more thing I'm trying to achieve is, How to split the interface bandwidth utilization into 2 buckets A) Inbound Interface Utilization B) Outbound Interface Utilization.

Any help is much appreciated here. I'm staring at an internal deadline set by my Management for Design closure in the next 2 days, any quick help will be worth in gold for me.

Thank you.

Regards,

Sriraj M

0 Kudos
2 Replies
Level 9

Hi Sri, Below query will give you the Polling time intervals of monitoring parameters, please let me know if this helps you.. https://hostname:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+Y.Lastsync+,X.AvgRes...

0 Kudos

Those datasets are pulling swql queries, swql is 95% the same as sql so almost any method you find online for filtering SQL time sets would apply similarly.

You node availability query already has a last 1 day filter applied with the getdate()-1 part

See the SWQL function list here SWQL Functions · solarwinds/OrionSDK Wiki · GitHub

You interface bandwidth utilization query already pulls the in and out bandwidth util in 2 buckets, along with like 10 other metrics.  Not sure how you are processing it on your end after you get the response but the bits you want are inpercentutil and outpercentutil

- Marc Netterfield, Github