Quantcast
Channel: THWACK: Unanswered Discussions - All Communities
Viewing all articles
Browse latest Browse all 19321

Node DurationDown

$
0
0

Can anyone help me to resolve this query to get an output with duration the node is down i.e DuratioDown instead of DaysDown????

Here is the Query:

 

SELECT DATEDIFF(d, T1.DownTime, CURRENT_TIMESTAMP) AS DaysDown, Nodes.Caption,  Nodes.IP_Address, T1.DownTime,  Nodes.Site, Nodes.Location

FROM
(SELECT
  Max(EventTime) AS DownTime, NetObjectID, NetworkNode

FROM Events

WHERE
  (EventType = 1) AND (NetObjectType ='N')

GROUP BY NetObjectID, NetworkNode
) AS T1 INNER JOIN Nodes ON T1.NetworkNode = Nodes.NodeID

WHERE
  (Nodes.Status = '2' OR Nodes.Status = '0')

ORDER BY DaysDown DESC, Nodes.Caption ASC,  T1.DownTime DESC

 

*****Note****
You may need to remove Nodes.Site because that is a custom property.

 

Here is a sample of the report:

 

 

28LXK13E8C65/13/2011 3:04:53 PMTower
19xxx.xx.x.xxx5/22/2011 9:11:38 AMTower
19KYKEWESPR2-VIP5/22/2011 8:18:25 AMCOT
16DTSFKSD015/25/2011 10:51:40 AM33R
15NPI43E1F25/26/2011 10:04:36 AM
10HPD110FG04615/31/2011 4:05:08 PM
10HPO110D904615/31/2011 4:00:56 PM
10NPI2E46515/31/2011 4:29:02 PMTowerHP Color LaserJet CP2025dn
8xxx.xxx.xx.xxx6/2/2011 9:50:49 PMHarlan DVR
8Aficio MP 80006/2/2011 2:01:09 PM
8COR/PP & CFC GARRAD CO. 50QLXX56/2/2011 9:50:26 PMDanville DVR152 PLEASANT RETREAT PLAZA LANCASTER, KY

Viewing all articles
Browse latest Browse all 19321

Trending Articles



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