Splunk Search

How do I join different events on an ID with different source types?

nikosattlermhp
Engager

Hello everybody,

I have many messages with two different source types and an ID and a information field. For every ID, there is one message from source 1 and one from source 2. I need to display to every ID the information field of both source types:

Example:

ID | Source 1 | Source 2 |

1 | info field from source 1 | info field from source 2 |
2 |info field from source 2 | null |

If there is no second event to an ID from the other source, "null" should be displayed.

How can I perform this join/combination?

My try:

index=myindex source1 | table id, infofield1 | join type=outer [search index=myindex source2 |table id, infofield2]

Thank you in advance!

Tags (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Here's something to try.

index=myindex (source1 OR source2) | stats values(infofield1) as infofield1 values(infofield2) as infofield2 by id | fillnull infofield2
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...