So I have a SWQL that shows me the routers we have (by name) that have only one OR only three EIGRP neighbors. This returns the node name of the router we need to go check. All the routers (in this group) that I'm checking should have either TWO or FOUR eigrp neighbors, never ONE or THREE.
The SWQL statement WORKS in SWQL Studio, but it does NOT allow me to add it as custom SWQL when crafting an alert:
SELECT
c.Caption
FROM
Orion.Routing.Neighbors AS n
LEFT JOIN
Orion.NPM.Nodes AS d ON n.NodeID = d.ID
LEFT JOIN
Cortex.Orion.Node AS c ON n.NodeID = c.NodeID
WHERE
n.ProtocolName = 'Cisco EIGRP'
AND n.IsDeleted = 0
AND n.ProtocolStatusDescription = 'Established'
GROUP BY
c.Caption
HAVING
COUNT(*) IN (1, 3)
ORDER BY
c.Caption