cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 7

SWQL Route Flapping Help

I am creating a Custom SWQL query for Route flapping. I found a SQL report that will work, but I cannot get my query to work in SWQL. I am trying to show the number of route flaps in the past hour. Here is the query I have so far:

Select TOP 50

     N.NODEID,

     DATEADD(hour,-1,GETDATE()) as "one hour ago",

     N.CAPTION AS "DEVICE"

     RF.ROUTEDESTINATION AS "ROUTE DESTINATION",

     COUNT(1) AS "TIMES FLAPPED"

FROM

     NPM_ROUTINGTABLE_FLAP RF

JOIN

     NODES N ON N.NODEID = RF.NODEID

WHERE datetime > DATEADD(hour,-1,GETDATE())

GROUP BY N.CAPTION, RF.ROUTEDESTINATION, N.NODEID

ORDER BY "TIMES FLAPPED" DESC

Any help would be greatly appreciated.

0 Kudos
0 Replies