Dashboards & Visualizations

Combining multiple events into one and show in a table

mlprasad79
New Member

Hi Team,

We have a service in Splunk which calls 3 different APIs and do some business logic and responds back a Code(P, W, F). I have my events some what looks like below :  interaction-id is the common field.

event1: myservice transaction begins

event2: myservice calls first-api

event3: myservice call to first-api is successful

event4: myservice calls second-api

event5: myservice calls to second-api is success

event6: myservice calls third-api

event7: myservice calls to third-api is success

event8: myservice is respond with result code 'W'

Now I need a table with these columns:

 

_timeinteraction-idis first-api successful ?is second-api successful ?is third-api successful?FInal Code
sometimesomeinteractionIdYesyesyesW
""NoyesyesX

 

Please help me with the query. 

 

Labels (1)
0 Karma

isoutamo
SplunkTrust
SplunkTrust

How about 

...
| stats first(_time) as _time values(*) as * by interaction-id

r. Ismo 

0 Karma

mlprasad79
New Member

Thanks for the reply Soutamo.

I ran this query but it is showing every other event along with the main events I mentioned in my post. 
The output table is loaded with all default fields along with manually extracted fields; but I need only the fields mentioned in the table.

Note: In my post, I mentioned only the needed events.

0 Karma

isoutamo
SplunkTrust
SplunkTrust
Then try to replace values(*) as * by each of your interested fields like values(field1) as field1 values(field2) as ....
0 Karma
Get Updates on the Splunk Community!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...