I have a SQL query that checks our store subnets for less than 128 IP addresses (we had an issue last week where some data mysteriously disappeared from IPAM awhile ago, and we just now realized it. so we would like to know immediately if this data goes missing again). I have it running as a report, but i would like to set it up as an alert instead. Here is the query:
SELECT COUNT(DISTINCT n.IPAddress) AS [Count],
g.FriendlyName as StoreNumber
FROM IPAM_Node n
JOIN [dbo].[IPAM_Group] g
ON n.SubnetId = g.GroupId
WHERE g.CIDR = 25
GROUP BY g.FriendlyName,
g.CIDR
HAVING COUNT(DISTINCT n.IPAddress) < 128;
Now i'm having trouble with setting it up as a new alert:
what should i use from the dropdown to make this validate?