Splunk Search

Calculating Sum of Percentages for Radial Gauge

evanleair
Explorer

Hi Splunk Masters,

I am new here and I'm building out a radial gauge for successful HTTP requests. I am counting 300 and 200 responses as successful. I have a search built out, but it is showing each responses value. Example below:

sourcetype=iis_logs http_status!=40* http_status!=5* UserAgent=UserAgent0* OR UserAgent=UserAgent1* | eventstats count as "totalCount" | eventstats count as "http_statusCount" by http_status| eval percent=(http_statusCount/totalCount)*100 | stats values(percent)| sort -values(percent)

This works out great in getting the information I need, but just need to find a way to add each value up as a total response. So instead of it showing 97.123, 1.123 and .045 it'll show a flat value of 98.29100.

Thanks

Tags (1)
0 Karma
1 Solution

sundareshr
Legend

Try this

 sourcetype=iis_logs UserAgent=UserAgent0* OR UserAgent=UserAgent1* | stats count as total count(eval(http_status<400)) as success | eval perc=success/total*100 | fields perc

View solution in original post

sundareshr
Legend

Try this

 sourcetype=iis_logs UserAgent=UserAgent0* OR UserAgent=UserAgent1* | stats count as total count(eval(http_status<400)) as success | eval perc=success/total*100 | fields perc

evanleair
Explorer

This worked! Thank you so much for your collaboration. Much appreciated.

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...