I was looking for a query to let me know if an interface is down for more than 31 days. We are going to some tech refresh and my network admins move so fast they never go back to do the house keeping. John W Johnson and sum_giais have done some great work in the past and was wondering if you had a solution to this query.
I use this one to tell me if a node is down for more than 5 days.
n.Caption AS Node,
e.ServerName AS PollingEngine,
n.ObjectSubType AS PollingMethod,
TOLOCAL(n.LastSystemUpTimePollUtc) AS LastUptimeLocal
FROM Orion.Interfaces.Interfaces n
JOIN Orion.Engines e ON n.EngineID = e.EngineID
WHERE n.ObjectSubType <> 'ICMP' AND n.Status = 2
AND DAYDIFF(TOLOCAL(n.LastSystemUpTimePollUtc), GETDATE()) > 5
ORDER BY n.LastSystemUpTimePollUtc ASC