Splunk Search

show precent of http errors

jrich523
Path Finder

I saw a decent amount of questions about similar stuff, but i wasnt able to make it happen.

I have a field that is http-status and i want the percent of http-status > 499 of total

Tags (3)
0 Karma
1 Solution

somesoni2
Revered Legend

Try following

<your base search which gives http_status field> | stats count as total, count(eval(tonumber(http_status)>499)) as total499plushttpstatus | eval percHttpStatus499Plus = (total499plushttpstatus*100)/total

View solution in original post

somesoni2
Revered Legend

Try following

<your base search which gives http_status field> | stats count as total, count(eval(tonumber(http_status)>499)) as total499plushttpstatus | eval percHttpStatus499Plus = (total499plushttpstatus*100)/total
Get Updates on the Splunk Community!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...