Splunk Search

In accesslog, "status" search.. help me ^^

khyoung7410
Communicator

Hi


Please help me a little "Search Command".


In accesslog, I should need two results.(count)


I Have a field name "status".


Using status field under line.


--- result ----


* | 404 | 40x 50x | ~


      6         300 ===> count

Please help me.

Thanks

Tags (1)
0 Karma

khyoung7410
Communicator

Hi Ayn!

Thank you for answer.

I learned so much thanks.

0 Karma

Ayn
Legend

Awesome. Could you please mark my answer as accepted? Thanks!

0 Karma

Ayn
Legend

I'm GUESSING the question is how you can get a table containing a count of the different values for the field "status"?

... | stats count by status

Or is the issue how to have one count for "404", but then group together all other 40x status codes? In that case use eval:

.... | eval status_group=case(status="404","404",match(status,"^40"),"40x",match(status,"^50"),"50x") | stats count by status_group
Get Updates on the Splunk Community!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

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