I have created a Task Scheduler event that emails me on EventID 14 in the Microsoft-Windows-Backup event log (note this is a new , style (Vista and up) log. I exported this and after some grubbing around on Serverfault and Technet, including this question
I got to the point of the XML for my task triggers being:
<Triggers>
<EventTrigger>
<Enabled>true</Enabled>
<Subscription><QueryList><Query Id="0" Path="Microsoft-Windows-Backup"><Select Path="Microsoft-Windows-Backup">*[System[Provider[@Name='Microsoft-Windows-Backup'] and EventID=14]]</Select></Query></QueryList></Subscription>
<ValueQueries>
<Value name="eventChannel">Event/System/Channel</Value>
<Value name="eventExinfo">Event/EventData/Data[@Name='ComponentStatus']</Value>
<Value name="eventRecordID">Event/System/EventRecordID</Value>
<Value name="eventSeverity">Event/System/Level</Value>
</ValueQueries>
</EventTrigger>
</Triggers>
Unfortunately, this produces an error (a Launch Failiure on the Action). The very similar:
<Triggers>
<EventTrigger>
<Enabled>true</Enabled>
<Subscription><QueryList><Query Id="0" Path="Microsoft-Windows-Backup"><Select Path="Microsoft-Windows-Backup">*[System[Provider[@Name='Microsoft-Windows-Backup'] and EventID=14]]</Select></Query></QueryList></Subscription>
<ValueQueries>
<Value name="eventChannel">Event/System/Channel</Value>
<Value name="eventExinfo">Event/EventData/Data[@Name='BackupTemplateID']</Value>
<Value name="eventRecordID">Event/System/EventRecordID</Value>
<Value name="eventSeverity">Event/System/Level</Value>
</ValueQueries>
</EventTrigger>
</Triggers>
Works fine and emails me the "BackupTemplateID" value.
I assume this is because the contents of "ComponentStatus" is itself XML but is not part of the Task Scheduler schema.
Does anyone know any way around this? Another method of getting the data is fine if this is not possible.
I would like this because the ComponentStatus section records if backup had a problem backing up Exchange as an Application, when the Event Description only indicates that the backup completed sucessfully.
0 Answers