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!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...