Splunk Search

Simple eventstats field is always blank

mv10
Path Finder

I have a relatively simple query that counts HTTP 404 events in IIS logs. I wanted to sort them according to which hosts had the highest individual count, however the "highcount" field is always blank. (I probably need to also sort by host, but that's irrelevant to the eventstats issue.)

 

index=iis status=404 uri="*/*.*"
|stats count by host uri
|eventstats max(count) by host as highcount
|sort -highcount -count
|table highcount count host uri

 

 

Labels (2)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

The eventstats syntax is incorrect.  Try this

index=iis status=404 uri="*/*.*"
|stats count by host uri
|eventstats max(count) as highcount by host
|sort -highcount -count
|table highcount count host uri

 

---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The eventstats syntax is incorrect.  Try this

index=iis status=404 uri="*/*.*"
|stats count by host uri
|eventstats max(count) as highcount by host
|sort -highcount -count
|table highcount count host uri

 

---
If this reply helps you, Karma would be appreciated.
0 Karma

mv10
Path Finder

Groan. 😁

0 Karma
Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...