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 ?
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 ]