Getting Data In

How to parse Microsoft-Windows-TaskScheduler/Operational logs?

kinkster
Explorer

Can someone help me out with a regular expression to parse Microsoft-Windows-TaskScheduler/Operational logs? I don't think I am the first to want to extract fields from this log? I am pulling in the above logs. I tried renderxml=true and renderxml=false.

I ran into this error below when trying to extract manually and the solution is to use my own regular expression.
The extraction failed. If you are extracting multiple fields, try removing one or more fields. Start with extractions that are embedded within longer text strings.

An example of the line I am trying to extract values is:

Message=Task Scheduler started "{CD0B4355-0A74-4D11-A816-04E3C5B138C5}" instance of the "\Adobe Flash Player Updater" task for user "contso\system301$"

I want to extract "\Adobe Flash Player Updater" as TaskName and "contso\system301$" as TaskUser.

Any help is appreciated.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try this untested query.

... | rex field=Message "(?<TaskName>\"[^\"]+\")\stask\sfor\suser\s(?<TaskUser>\"[^\"]+\")" | ...
---
If this reply helps you, Karma would be appreciated.

kinkster
Explorer

This worked, thanks!

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Cool. Please accept the answer.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...