This is from a related discussion here. I want to send out Alerts when a particular node stops responding to SNMP polls for whatever reason. Obviously this needs to exclude Nodes managed by Non-SNMP means. I found CPULoad_Detail table gets updated once every polling cycle for each node. Is it possible to alert if it has not been updated for more than 10 minutes? This is a rough SQL query (which doesn't work). I need SQL guru's help on this to convert to meaningful alert.
SELECT Nodes.NodeID AS NetObjectID, Nodes.Caption AS Name
FROM Nodes
inner join CPULoad_Detail on CPULoad_Detail.NodeID = Nodes.NodeID
WHERE
(
(DATEDIFF(mi, (Select Top 1 DateTime from CPULoad_Detail where CPULoad_Detail.NodeID = Nodes.NodeID), getdate()) > 10) AND
(
NOT (Nodes.Status = '9') AND
NOT (Nodes.Status = '11'))
)