does someone know how to write proper XPath query for filtering certain application pool errors in Windows 2008 R2 Event log ("Applications" section)?

EventData in XML view from Application eventlog does not containt data descriptions:

Event from Application:

- <EventData>
  <Data>An unhandled exception has occurred.</Data> 
  <Data>2011-04-30 13:53:42</Data> 
  <Data>2011-04-30 11:53:42</Data> 

Event from Security:

  <Data Name="TargetUserSid">S-1-5-21-775773886-3418497561-2363255987-1293</Data> 
  <Data Name="TargetUserName">someusername</Data> 
  <Data Name="TargetDomainName">servername</Data> 

Does anyone have any idea how to write XPath query (I want to create custom view) to filter event log entries from Application section which contains certain applicationpool username (in this example it is "SERVERNAME\usernamefromwebsiteapplicatiopool").

Thank you


I've solved my problem:

 <Query Id="0" Path="Application">
  <Select Path="Application">*[EventData[(Data[17]='SERVERNAME\applicationpoolname')]]</Select>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.