This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

SWQL: Totalbytes transferred this/last month?

Hi, I'm trying to generate a chart showing the total number of bytes transferred over specific interfaces on a monthyly level.  I can grab this info from Orion.NPM.Interfacetraffic.  I'm having trouble figuring out how i can sum all the bytes based on the time stamp though.

My query is:

SELECT DATETRUNC('month', DATETIME) AS MonthOfYear, SUM(TotalBytes) AS Sumbytes
FROM Orion.NPM.InterfaceTraffic ONIT WHERE ONIT.Interface.Node.CustomProperties.Site LIKE 'AWS'
GROUP BY DATETIME

I think i'm on the right track, but i have no experience writing SQL let alone SWQL.  Any help would be much appreciated.