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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...