locked
How to detect MonitoringObject deletion RRS feed

  • Question

  • I'm looking for a way to detect changes to MonitoringObjects - some way to be notified when a MonitoringObject is deleted, added, or updated.  Should this functionality be available using MonitoringObject event OnRelatedEntitiesChanged?   In my testing, I have not been able to recieve any notification of object deletion.  I have observed that events that are sent for the MonitoringObjectGroup objects to which new objects are added.  Does anyone know if there is any way to accomplish this using the SDK, other than by using poll based queries? 
    Thanks, -Barry
    Tuesday, June 30, 2009 3:41 PM

Answers

  • Unfortunately, there is no way to do this without polling. There is a known issue with the OnRelatedEntitiesChanged event where deletions are omitted. Deletions in general are hard unless you get back all instances of a particular type, because if you apply any criteria, you are not sure if something didn't match the criteria anymore, or was deleted. If you query for MonitoringRelationshipObject, you can actually specifiy to get deleted relationships back which might help solve your problem, but ultimiately, you'll need some sort of polling based solution.

    What concrete scenario are you trying to accomplish?

    -- Jakub Oleksy Developer Blog: http://blogs.msdn.com/jakuboleksy/ This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by StuartR Thursday, August 27, 2009 7:55 PM
    Wednesday, July 1, 2009 7:00 PM