Splunk Search

Search related events

mprad
New Member

We have java based rest service A with logfile a.log and another rest service B with log b.log
when A receives a request it creates a unique request id (let call ABigRequesiId) and splits this request into multiple
smaller requests with unique request ids (ASmallerRequestId1,ASmallRequestId2,ASmallRequestId3 .....) for each request and send these requst to service B

So I am able to search based on "ABigRequestId" inside a.log and look for an event CREATE_SMALLER_REQUESTS and
get all (ASmallerRequestId1,ASmallRequestId2,ASmallRequestId3) , But now with these requestIds I want to search b.log
and look for other events in b.log , I am not able to do this in the same query Can you please suggest ?

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

A subsearch should do it.  Use the subsearch to find the smaller request IDs from a.log and pass them to the main search that searches b.log.

index=foo source=a.log
[ search index=bar source=b.log ABigRequestId CREATE_SMALLER_REQUESTS
  | fields ASmallerRequestId | format ]
---
If this reply helps you, Karma would be appreciated.
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 ...