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;-)

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Defend at Machine Speed: Your Guide to Security Sessions at .conf26

Splunk .conf26   With threats moving at machine speed and attack surfaces expanding across hybrid ...

Where Innovation Takes Flight: The Splunk4Aviation Flight Sim Lands at .conf26

If you hear someone at .conf26 shouting "gear down, GEAR DOWN" across the show floor, you have found us.  The ...

Turn Cisco Telemetry Into Action with Cisco Data Fabric, powered by the Splunk ...

The surge in machine data is already hitting enterprise budgets, and the agentic era will only intensify it. ...