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!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...