2 Replies Latest reply on Oct 13, 2016 3:01 PM by mesverrum

    SWQL "Group By" command for Custom Query dashboard resource


      Trying to display data gathered from a custom script monitor within a custom query resource on our dashboard view - however I can't seem to get the query to actually display grouped data - instead I just end up with a list of data as if I didn't group anything in the first place.


      select n.Caption as Node, ac.Name, de.StringData as Data from Orion.APM.Application app
      JOIN Orion.Nodes n
      on n.NodeID=app.NodeID
      JOIN Orion.APM.Component ac
      on ac.ApplicationID=app.ApplicationID
      JOIN Orion.APM.ComponentStatus cs
      on cs.ComponentID=ac.ComponentID
      inner join
      (select ComponentID, max(TimeStamp)as TimeStamp from Orion.APM.ComponentStatus 
      group by ComponentID)cs2
      on (cs.ComponentID=cs2.ComponentID and cs.TimeStamp=cs2.TimeStamp)
      JOIN Orion.APM.DynamicEvidence de
      on de.ComponentStatusID=cs.ID
      where app.Name='DR Monitors'
      and de.StringData is not NULL
      and n.NodeID=3639
      GROUP BY n.Caption, ac.Name, de.StringData, ac.ComponentOrder
      Order by ac.ComponentOrder


      In this example, I'm pulling one NodeID, but eventually I'll want to do any with the same Application Monitor.  It displays all lines - but really I want a node header with components and stats beneath like a typical report.


      Thanks in advance for any feedback.