Below are 2 queries which returns different events but have a common field thread_id which can be taken by using below rex. raw message logs are different for both queries. I want events list with raw message logs from both query but only if each raw message has this common thread_id I have tried multiple things like join, append, map and github copilot as well but not getting the desired results. Can somebody please help on how to achieve this. rex field=_raw "\*{4}(?<thread_id>\d+)\*" index="*sample-app*" ("*504 Gateway Time-out*" AND "*Error code: 6039*") index="*sample-app*" "*ExecuteFactoryJob: Caught soap exception*" index="*wfd-rpt-app*" ("*504 Gateway Time-out*" AND "*Error code: 6039*")
| rex field=_raw "\*{4}(?<thread_id>\d+)\*"
| append [ search index="*wfd-rpt-app*" "*ExecuteFactoryJob: Caught soap exception*" | rex field=_raw "\*{4}(?<thread_id>\d+)\*" ]
| stats values(_raw) as raw_messages by _time, thread_id
| table _time, thread_id, raw_messages I tried above query but it is returning some results which is correct which contains raw message from both the queries, but some results are there which contains thread id and only the 504 gateway message even though the thread_id has both type of message when I checked separately. I'm new to splunk, any help is really appreciated.
... View more