I am using the out of the box SWQL alert for memory run out and i've added a secondary section to the alert. I want it to alert for only the nodes that have the custom field set (MonkeyNutsAlerts) = Yes. I am still getting alerts for all servers in my environment not just the ones with the custom field set to 'Yes'. If anyone can tell me where I'm going wrong it would be much appreciated?
Have I just got the sections the wrong way round? Can I even do it like this?
Here is the alert so far...
Node Capacity Forecasting
SELECT NodesForecastCapacity.Uri, NodesForecastCapacity.DisplayName FROM Orion.NodesForecastCapacity AS NodesForecastCapacity
LEFT JOIN Orion.Nodes nodes on nodes.NodeID = NodesForecastCapacity.NodeID
LEFT JOIN Orion.Settings s ON s.SettingID = 'ForecastMinDays'
WHERE
NodesForecastCapacity.DaysToCapacityAvg <=7
AND NodesForecastCapacity.MetricName = 'Forecast.Metric.PercentMemoryUsed'
AND DayDiff(NodesForecastCapacity.MinDateTime, NodesForecastCapacity.MaxDateTime) >= ISNULL(s.CurrentValue, 7)
AND nodes.Unmanaged = false
Secondary Section :
Node
SELECT Nodes.Uri, Nodes.DisplayName FROM Orion.Nodes AS Nodes
WHERE Nodes.CustomProperties.MonkeyNutsAlerts LIKE 'Yes'