Quantcast
Channel: THWACK: All Content - Network Performance Monitor
Viewing all articles
Browse latest Browse all 21870

Sum function not working as expected in SWQL

$
0
0

I am trying to write a SWQL query that will combine traffic statistics for multiple interfaces based on a custom property.  I want to use this information to produce a custom chart in NPM.  The problem is the query is not adding the traffic statistics together for each timestamp even though the timestamps appear to be the same.  Here is the query I'm using:

 

SELECT IT.DateTime, SUM(InAveragebps) AS InAveragebps, SUM(OutAveragebps) AS OutAveragebps, I.CustomProperties.ASIC

FROM

Orion.NPM.InterfaceTraffic IT

INNER JOIN

Orion.NPM.Interfaces I

ON IT.InterfaceID = I.InterfaceID

INNER JOIN

Orion.Nodes N

ON I.NodeID = N.NodeID

WHERE

N.NodeID = ${NodeID}

AND

I.CustomProperties.ASIC IS NOT NULL

GROUP BY IT.DateTime, I.CustomProperties.ASIC

 

Here is an example of results that should be added together, but are not:

 

DATETIMEINAVERAGEBPSOUTAVERAGEBPSASIC
7/11/2014 8:39:36 PM355296.53123240.48241
7/11/2014 8:39:36 PM373476.2550935.291
7/11/2014 8:39:36 PM1026.508185912.864751

 

I suspect that the problem may be that the timestamps actually include milleseconds, which are not shown in the formatted date.  How can I change the query so that it will ignore milliseconds, or even seconds for that matter?


Viewing all articles
Browse latest Browse all 21870

Trending Articles



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