Splunk Search

Recursive searches based on parent ids

vbumgarn
Path Finder

We have logs that do stuff like this:

  message id=1
  message id=2 parent=1
  message id=2 parent=1
  message id=3 parent=1
  message id=5 parent=2
  message id=5 parent=2
  message id=6 parent=5
  message id=6 parent=5

It's easy enough to do a subsearch that gets one level of relationship, but is there any way to search for all related messages recursively?

Tags (2)

gkanapathy
Splunk Employee
Splunk Employee

I believe in Splunk 4.1 you can do:

sourcetype=messages | eval f=id." ".parent | makemv f delim=" " | transaction f

but that the transaction command in 4.0 and below won't do this.

Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...