I would like to write a custom sql alert for when an interface increments errors(greater than 100) on the Gi(6) or Fa(53) interfaces, for 3 consecutive polling cycles. I've seen a discussion on the forums for a UnDP that checks for incrementing errors, but since Solarwinds is already gathering errors in the InterfaceErrors_Detail table, I don't want to duplicate the alert with a UnDP. I am thinking that I need to do a Select for TOP 3 and then self join to check where each column is greater than 100...or maybe a nested Select TOP 1 to get the latest value for each host and set the alert to trigger after the condition is true for 30 minutes. I To get a list of all of the alerts, I've started out with the following query. But I'm having troubel figurign out how to finish it.
- Thanks in advance.
SELECT InterfaceErrors_Detail.DateTime AS Time, Interfaces.InterfaceID AS NetObjectID, Interfaces.FullName AS Name
FROM Interfaces
INNER JOIN
InterfaceErrors_Detail
ON Interfaces.InterfaceID = InterfaceErrors_Detail.InterfaceID
WHERE
(
--(InterfaceErrors_Detail.In_Errors > 100)
--AND
((Interfaces.InterfaceType = '6') OR (Interfaces.InterfaceType = '53'))
)
ORDER BY Interfaces.FullName ASC