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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...