Splunk Search

How to Identify the events based on condition on other events

rangarbus
Path Finder

Hello Splunk Experts: From a system, we receive following events in splunk.

I would like to get the event which doesn't have logEvent as Received but has only logEvent as Delivered.

traceId field will have same value on both Received and Delivered events.

Here in the below example, traceId=101 is such an event.  

 

{"logEvent":"Received","traceId": "100","message":"Inbound received", "id" : "00991"}
{"logEvent":"Delivered","traceId": "100","message":"Inbound sent", "id" : "00991-0"}
{"logEvent":"Delivered","traceId": "101","message":"Inbound sent", "id" : "00992-0"}
{"logEvent":"Received","traceId": "102","message":"Inbound received","id" : "00993"}
{"logEvent":"Delivered","traceId": "102","message":"Inbound sent","id" : "00993-0"}

 

 

Labels (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Are the fields already extracted?

| eventstats values(logEvent) as logEvents by traceId
| where logEvents="Delivered" AND mvcount(logEvents) = 1

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust

Are the fields already extracted?

| eventstats values(logEvent) as logEvents by traceId
| where logEvents="Delivered" AND mvcount(logEvents) = 1
Get Updates on the Splunk Community!

Celebrating Fast Lane: 2025 Authorized Learning Partner of the Year

At .conf25, Splunk proudly recognized Fast Lane as the 2025 Authorized Learning Partner of the Year. This ...

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...