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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...