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

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

$
0
0

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+,+A.DateTime+,+A.PercentLoss+,+A.Availability+FROM+Orion.ResponseTime+A+inner+join+orion.nodes+as+B+on+A.nodeid+=+B.nodeid+WHERE+A.datetime+>=+(getdate()-1)


Node Response time

https://hostname:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+X.AvgResponseTime+,+X.MinResponseTime+,+X.MaxResponseTime+,+X.ResponseTime+,+X.PercentLoss+,+X.CPULoad+,+X.MemoryUsed+,+X.PercentMemoryUsed+,+X.LastBoot+,+X.SystemUpTime+,+X.NodeID+,+Y.Caption+FROM+Orion.NodesStats+X+inner+join+Orion.Nodes+AS+Y+on+X.nodeid+=+Y.nodeid

 

Avg. CPU Load

https://hostname:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+X.AvgResponseTime+,+X.MinResponseTime+,+X.MaxResponseTime+,+X.ResponseTime+,+X.PercentLoss+,+X.CPULoad+,+X.MemoryUsed+,+X.PercentMemoryUsed+,+X.LastBoot+,+X.SystemUpTime+,+X.NodeID+,+Y.Caption+FROM+Orion.NodesStats+X+inner+join+Orion.Nodes+AS+Y+on+X.nodeid+=+Y.nodeid

 

Percent Memory Used

https://hostname:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+X.AvgResponseTime+,+X.MinResponseTime+,+X.MaxResponseTime+,+X.ResponseTime+,+X.PercentLoss+,+X.CPULoad+,+X.MemoryUsed+,+X.PercentMemoryUsed+,+X.LastBoot+,+X.SystemUpTime+,+X.NodeID+,+Y.Caption+FROM+Orion.NodesStats+X+inner+join+Orion.Nodes+AS+Y+on+X.nodeid+=+Y.nodeid

 

Interface bandwidth utilization

https://hostname:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+Y.NodeID+,+X.InterfaceID+,+X.ObjectSubType+,+X.Name+,+X.Speed+,+X.MTU+,+X.LastChange+,+X.PhysicalAddress+,+X.AdminStatus+,+X.OperStatus+,+X.InBandwidth+,+X.OutBandwidth+,+X.Caption+,+Y.caption+,+X.FullName+,+X.Outbps+,+X.Inbps+,+X.OutPercentUtil+,+X.InPercentUtil+,+X.OutPps+,+X.InPps+,+X.InPktSize+,+X.OutPktSize+,+X.OutUcastPps+FROM+Orion.NPM.Interfaces+X+Inner+Join+orion.Nodes+as+Y+on+X.Nodeid+=+Y.Nodeid

 

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


Viewing all articles
Browse latest Browse all 2677

Trending Articles



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