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
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
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
This worked! Thank you so much for your collaboration. Much appreciated.