Splunk Search

Need Regex to pull all the pid,PPID and MD5 values

SabariRajanT
Path Finder
 
Labels (2)
0 Karma

venkatasri
SplunkTrust
SplunkTrust

@SabariRajanT  you can try this however they should have been auto extracted for you. Did you try to run in Verbose mode?

| rex field=_raw "\\\"pid\\\"\:(?<pid>\d+)" 
| rex field=_raw "\\\"ppid\\\"\:(?<ppid>\d+)" 
| rex field=_raw "\\\"md5\\\"\:\\\"(?<md5>\S+)\\\""

Alternatively you can use the | spath command as well.

---

An upvote would be appreciated if this reply helps! 

PickleRick
SplunkTrust
SplunkTrust

At first glance it looks that they should be auto-extracted but notice that most of the data in the example is not a json section but a string. So you'd need to separately parse it as json (or extract with a regex, as you showed. Also, it's worth noticing that the value you'll get from your regexes will need to be unescaped.

0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...