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!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...