Splunk Search

Alert Based Off Current Event Duration

NewToSplunk1
Explorer

Goal: Being able to alert off the latest event if the event is more than 300 seconds and is not blank or "non-productive".

Here is my current search and the results: 

NewToSplunk1_0-1694011225839.png

NewToSplunk1_2-1694012082568.png

Every incident is an open or a closing of an event. If the incident is blank, that signifies a closing of the previous event. If the incident has a string, that is the current open event. 

In my ideal scenario, I would alert based on any incident where I have a string value within the incident field, current duration has surpassed 300 seconds, and I don't have a value in the total duration field. 

However, when I try to add a filter for | where total duration = "", no results are returned at all.. Which I am confused about since the latest totalduration event is blank since streamstats is false...

Any help or tips greatly appreciated!

Labels (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Try this

| where isnull(TotalDuration)

View solution in original post

NewToSplunk1
Explorer

Thank you!!

0 Karma

NewToSplunk1
Explorer

| where TotalDuration = null returns no results as well.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try this

| where isnull(TotalDuration)
Get Updates on the Splunk Community!

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

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...