Hello All,
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.
SELECT
n.Caption AS Node,
e.ServerName AS PollingEngine,
n.InterfaceID,
n.ObjectSubType AS PollingMethod,
n.Status,
n.ChildStatus,
n.DetailsUrl,
n.IPAddress,
n.MachineType,
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