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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...