Splunk Search

Splunk query to check for error within 150 seconds range

kirrusk
Communicator

Hi,

I need to configure an alert when there is an error.

Example: "error: file not able to found"  for an app 

(need to get alert, if more than two messages for same app within 120-150 secs)

is it possible to configure, Can anyone please suggest?

 

 

 

Labels (7)
Tags (2)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @kirrusk,

You have to aggregate your data, something like this:

index=your_index "error: file not able to found" earliest=-120s latest=now
| stats count BY app
| where count>2

You can change the treeshold and the time period as you like.

Using this search you can configure an alert that fires when results are greater than 0 (because the treeshold is in the search.

Ciao.

Giuseppe

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @kirrusk,

You have to aggregate your data, something like this:

index=your_index "error: file not able to found" earliest=-120s latest=now
| stats count BY app
| where count>2

You can change the treeshold and the time period as you like.

Using this search you can configure an alert that fires when results are greater than 0 (because the treeshold is in the search.

Ciao.

Giuseppe

0 Karma

gcusello
SplunkTrust
SplunkTrust

hi @kirrusk,

good for you, see next time!

Ciao and happy splunking.

Giuseppe

P.S.: Karma Points are appreciated;-)

Get Updates on the Splunk Community!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...