I've created the following custom sql alert to notify when a vCenter is unavailable which is working as expected.
SELECT Nodes.NodeID AS NetObjectID, Nodes.Caption AS Name
FROM Nodes
JOIN VIM_VCenters ON ( VIM_VCenters.NodeId = Nodes.NodeId )
WHERE (Nodes.Status <> '1' OR Nodes.Status <> '9') AND (VIM_VCenters.ManagedStatus = '17')
However, I'm having trouble with displaying the VIM_Centers.ManagedStatus value in the message body (Email Action). I'm using the following SQL statement but it returns a blank result.
ManagedStatusMessage = ${SQL:Select VIM_VCenters.ManagedStatusMessage from VIM_VCenters where VIM_VCenters.NodeID = NodeID}
Can anyone advise why it is not returning a value?