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!

A Four-Part Event Series: Full Stack Observability For the AI Era

As AI reshapes applications, infrastructure, and the way teams operate, the traditional boundaries of ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...