Splunk Search

Count requests that start, but don't finish

oompaloompa
Loves-to-Learn Lots

I have an API that logs the start and end of each request. What I'd like to make sure I'm monitoring is the requests that start but, for whatever reason, don't finish. Should never happen, but I'd like to be sure I can identify them just in case.

The start of a request looks like this:

 

...
line.component="gateway" 
line.message="request received" 
...

 

The end looks like this:

 

...
line.component="gateway" 
line.message="request completed" 
...

There is a request-id value logged for each request that traces a given request through the app. What I guess I'm looking for is a left join that counts any null completed values. I've been playing with the "join type=left request-id" syntax, but haven't found the thing that gets me where i need. Any ideas?

 

 

0 Karma

rnowitzki
Builder

Hi @oompaloompa ,

join is pretty hungry, you could better use stats, e.g.:

| line.message="request received" OR line.message="request completed"
| stats dc(line.message) as message_count by request.id
| where message_count=1


Hope it gives you an idea.

BR
Ralph
--
Karma and/or Solution tagging appreciated.

--
Karma and/or Solution tagging appreciated.
0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...