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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...