I have added the Windows Scheduled task monitor to a node (in this case nodeID 391 as seen below. And I need to alert when tasks fail, but also when a specific task runs too long.
If I run the SWQL after that task has been running over 30 minutes it does return the correct result. I am not sure how to convert it into an alert when this condition is met.
SELECT ComponentID, NodeID, Name
FROM Orion.APM.Wstm.Task
Where Name = 'Task Name' and NodeID = '391' and State = '4' and MINUTEDIFF(ToLocal(LastRunTime), GETDATE()) > '30'
Thanks for any suggestions