I need some advanced help my friends. I am trying to create an alert based off a failed NCM compliance policy rule.
The goal is basically this - run a compliance report and then trigger an alert for each node that fails a specific rule. The alert action would then change the value of a certain node custom property.
The following SWQL query gives me the error, "Cannot implicitly convert from data type Guid to data type Int32":
SELECT n.NodeID
FROM Cirrus.PolicyCacheResults r
JOIN Orion.Nodes n ON r.NodeID = n.NodeID
WHERE r.IsViolation = True AND r.RuleName = 'rule name here'
Can anyone help me with the query and how to get it into a custom SWQL trigger query?
Thanks.