1 Reply Latest reply on May 30, 2017 2:23 PM by tdanner

    How to find Active Time from Orion.AlertActive.TriggeredDateTime Column


      Hi Guys,


      I have wrote a SWQL query from creating a perticular report for a perticular region.

      I want to show Active time in the report just like Active Alert Report have the Active time cloumn (eg: 2d 3h 5m ago)


      kindly help here.


      I have wrote this query:


      SELECT ac.Name as [AlertName],ao.EntityCaption as [Device],aa.TriggeredDateTime as [TriggeredDATETIME],ao.RelatedNodeCaption as [related Node],aa.AcknowledgedBy,ncp.Priority,ncp.DeviceType,ncp.Region

      FROM Orion.AlertObjects ao Inner Join Orion.AlertConfigurations ac

      on ao.AlertID = ac.AlertID

      inner join orion.AlertActive aa

      on aa.AlertObjectID = ao.AlertObjectID

      left join Orion.Nodes n

      on ao.AlertObjectID = n.NodeID

      left join Orion.NodesCustomProperties ncp

      on n.NodeID = ncp.NodeID

      where aa.TriggeredMessage is not NULL

      and ncp.Region = 'APAC'