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!

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