Alerting

How to create an alert if a value of a field is > some value x for 90% of events during a time period

testSplunk1
Engager

Newbie to splunk. Could someone help me here. I have events coming in ( lets say 1/sec ) which give me number of connections in use in a pool. I would like to create an alert if say 90% of the events over a 5 minute period exceed some value ( say 10 ).

Any help would be greatly appreciated.

Tags (1)
1 Solution

somesoni2
Revered Legend

Try something like this (assuming Field name to validate is NoOfConn and threshold NoOfConn is 10)

   ... your search... | eval status=if(NoOfConn > 10,"Over","NA") | eventstats count(eval(status="Over")) as countOver, count as Total | eval overPerc=round((countOver*100/Total)) | where overPerc>=90

View solution in original post

somesoni2
Revered Legend

Try something like this (assuming Field name to validate is NoOfConn and threshold NoOfConn is 10)

   ... your search... | eval status=if(NoOfConn > 10,"Over","NA") | eventstats count(eval(status="Over")) as countOver, count as Total | eval overPerc=round((countOver*100/Total)) | where overPerc>=90

somesoni2
Revered Legend

Great. If there are no followup questions, please mark the answer as accepted.

0 Karma

testSplunk1
Engager

Worked great ! Thanks

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