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!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Your Voice Matters! Help Us Shape the New Splunk Lantern Experience

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Building Momentum: Splunk Developer Program at .conf25

At Splunk, developers are at the heart of innovation. That’s why this year at .conf25, we officially launched ...