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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...