Dashboards & Visualizations

fetching the count based on field value

sahana
Engager

Hi 

I get a log in below format of JSON obj

message{

             Dashboard{

                             status: SUCCESS

                              operationName:gettingResult

}

In the above logs i get a value of SUCCESS/FAILURE for status. Now my requirement is to calculate a total,totalSuccess and totalFailure based on operationName. Tried the below query but it is not working out

 

 ......messgae.Dashboard.status=*| stats count as total,count(eval(messgae.Dashboard.status=SUCCESS)) as totalSuccess, count(eval(messgae.Dashboard.status=FAILURE)) as totalFailure by messgae.Dashboard.operationName

 

getting value for total but not for totaSuccess /totalFailure

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Is it simply a typo in the field name? Or not having quotes around SUCCESS and FAILURE?

0 Karma

sahana
Engager

It is simply a typo we don't have any quotes for success and failure

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Have you tried it with quotes around SUCCESS and FAILURE?

0 Karma

sahana
Engager

Yes I have tried it also not working

 

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