Splunk Search

How to link two events without loosing data?

keanderson
Engager

I am trying to link 2 events together due to information in the first event not showing in the second. the information is needed to filter the results. I have been trying to use transaction but in doing that I am loosing information needed to filter the end results-

 

eventA OR (eventB (amount>25 AND amount!=250 AND amount!="NONE"))
|transaction blue
|lookup C fieldD OUTPUT eggs
|search eggs>21
|table fieldD amount eggs blue

 

that is the basics of the search, the problem is that fieldD is only in eventA, amount only in eventB. After using transaction to link them, amount disappears and can't be used to filter.

Is there any other way to link the 2 events without loosing data within the events? 

Labels (1)
Tags (3)
0 Karma

keanderson
Engager

I think that would normally work but in this case it switched it so I was getting amount but not fieldD. I ended up using a lookup for an alternative. so far it is working. Thank you though! That is good information to know for other situations.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

If they have a common value, e.g. transaction id, you can use stats by

| eventstats values(fieldD) as fieldD values(amount) as amount by transactionId
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

SOK it to Me: Top 3 Benefits of Using Splunk Operator on Kubernetes that’ll Make ...

    Thursday, July 9, 2026  |  11:00AM–12:00PM PDT Duration: 1 hour (includes Q&A) Managing can feel like a ...

Upgrade Prep for 10.4, Network Observability Deep Dives, and More from Splunk Lantern

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

Splunk Developer Day announcements: AI agents, MCP tools, Forecasting, and Custom ...

Splunk Developer Day was packed with product and platform updates for developers building in the AI ...