0 Replies Latest reply on May 14, 2014 9:18 AM by oliver.grist

    CPULoad query - SWQL Date Format

    oliver.grist

      I have noticed one or two devices are always reporting an AvgLoad of 100%

       

      I wrote this query to help us keep track, but are their any date functions available in SWQL?

           Ideally I want something along the lines:

                AND ObservationTimestamp > (UNIX_TIMESTAMP()-86400)

           or

                AND ObservationTimestamp > (NOW() - INTERVAL 1 DAY)

       

      For now I have hardcoded a date:

      SELECT NodeID, COUNT(*) as total

      FROM Orion.CPULoad

      WHERE ObservationTimestamp > '13/05/2014 00:00'

      AND AvgLoad = 100

      GROUP BY NodeID

          HAVING COUNT(*) > 4

      ORDER BY COUNT(*) DESC;