Splunk Search

How i merge multiple events based on the same value in a field?

leonl_0
Observer

I currently have events that include load times and events that include header colour for my app. These events both have the user's session id. How do I join the two events based on session Id so i can see the load time based on header colour?

Query for Load time:

 

index="main" measurement_type=loadTime screen_class_name=HomeFragment

 

 Query for HeaderColour:

 

index=api_analytics sourcetype=api_analytics 
| `expand_api_analytics`
| search iri=home/header
| spath input=analytic path=session_id output=session_id

 

Labels (2)
0 Karma

leonl_0
Observer

If i use the following command, it truncates everything in the second query so that I only have one unique value for every other fields

index=main measurement_type=loadTime screen_class_name=HomeFragment
| join sessionId [search index=api_analytics sourcetype=api_analytics
| `expand_api_analytics`
| search iri=home/header
| spath input=analytic path=session_id output=sessionId]

 

0 Karma
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 ...