Splunk Search

how to use count(eval(httpstatus="2*")) as success count(eval(httpstatus!="2*")) as failed in search query

mvaradarajam
Path Finder

Hi All,

how to use count(eval(httpstatus="2*")) as success count(eval(httpstatus!="2*")) as failed in search query

Tags (1)
0 Karma

strive
Influencer

http status codes 3* are not considered as errors. If you need pure errors then

some search terms | stats count(eval(searchmatch("httpstatus=2*"))) as success count(eval(searchmatch("httpstatus!=2*"  AND httpstatus!=3*" ))) as failed
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Without any more info I'm going to take a wild guess at what you might want:

some search terms | stats count(eval(searchmatch("httpstatus=2*"))) as success count(eval(searchmatch("httpstatus!=2*"))) as failed
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 ...