Alerting

Alert condition to trigger 51% of failure responses

Mahasplunk
Loves-to-Learn Lots

Hi,

 I need to have  Splunk alert condition trigger email alert where  If 51%  of failure occurred out of total (success + failures ) no. of responses over period of time interval.()

For Ex:  If Splunk get total response = 10

      if failure response count >=6(more than 50% of total no. of response) then trigger alert.(Success count is 4 or less)

 

Labels (3)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

What is your question?

If you're trying to calculate the failure percentage then what have you tried so far?

---
If this reply helps you, Karma would be appreciated.
0 Karma

Mahasplunk
Loves-to-Learn Lots

I have tried to get the total response count and then try get the % of failure to check if its >51.. could you please provide the better approach

| stats count(eval(match(Type,"FAILURE"))) as f count as fc | stats count(eval(match(Type,"SUCCESS"))) as s count as sc |eval t=fc+sc|eval perF=((fc/t)*100 ,2)| where perF>51 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

You have the general idea.  The second stats command won't work as expected because the first has transformed the results.  You can combine them, however, in this case the second is not needed.

| stats count(eval(match(Type,"FAILURE"))) as fc, count as t
| eval perF=round((fc*100)/t, 2)
| where perF>51 

 

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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