I build an Advanced SLQ alert with the following where clause:
WHERE( (DATEDIFF(mi, Nodes.LastSystemUpTimePollUtc, getutcdate()) > 60) AND (Nodes.Status = '1'))
this should alert on any node that has not responded to SNMP in the past 60 minutes. however I'm getting some false positives.
If I execute the following query the nodes that are producing false positives have a LastSystemUpTimePollUtc in the future.
SELECT IP_Address, Caption, LastSystemUpTimePollUtcFROM NodesWHERE ((DATEDIFF(mi, Nodes.LastSystemUpTimePollUtc, getutcdate()) > 60) AND (Nodes.Status = '1'))ORDER BY LastSystemUpTimePollUtc DESC
I'm knocking this one up to my lack of experience with SQL but I'm hopping I can get someone to point out what I'm missing as well as a fix to my code to correct the issue.. Thanks!