Data Item XML - MonitorTaskDataType

This data type is used as input for recovery task. Recovery can be executed on diagnostic or it can be executed on the state change where later is always present because diagnostic is always associated with state change of monitor. Because this is input data item, $Data/…$ context parameter replacement can be used and XPath queries can be created easier once we discuss its XML representation.

<DataItem type="MonitorTaskDataType" time="2007-03-11T15:15:19.0249088-07:00" >


        <DataItem time="2007-03-11T15:15:17.5561588-07:00" type="System.Health.MonitorStateChangeData">









This part will always carry a data item which caused state change in the first place if this is indeed a state change for unit monitor. It is empty for all other monitors (aggregate rollup and dependency rollup). State change trigger is another data type so internal XML fragment will represent its XML representation and will start with <DataItem>. Following is representation of event data type.

                <DataItem type="Microsoft.Windows.EventData" time="2007-03-11T15:14:53.0000000-07:00">



                    <PublisherName>Sample Publisher</PublisherName>







                    <RawDescription><![CDATA[This is sample event for %1]]></RawDescription>


                    <CollectDescription Type="Boolean">true</CollectDescription>






                    <EventDescription><![CDATA[This is sample event for SampleComputer]]></EventDescription>






This whole section exists when recovery is executed on Diagnostic. It will always carry a data item which was produced by diagnostic if there is indeed one created.In that case it will start with <DataItem>. And again, XPath can be created to access values of its particular properties.



XPath to properties:

State change and especially its trigger is most of the time data item which might be interesting to use. To get to the properties of the trigger, one must always type following:

$Data/StateChange/DataItem/Context/DataItem/< relative path to the property>$

Sometimes diagnostic can produce a data item which can be later used inside of recovery, especially if recovery actions should be based on the Boolean expression comparing diagnostic output against some values. It this case it is possible for diagnostic to produce a property bag data type and one should always use following:

$Data/Diagnostic/DataItem/ Property[@Name=’<name of the property>’]