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!

Let’s Talk Terraform

If you’re beyond the first-weeks-of-a-startup stage, chances are your application’s architecture is pretty ...

Cloud Platform | Customer Change Announcement: Email Notification is Available For ...

The Notification Team is migrating our email service provider. As the rollout progresses, Splunk has enabled ...

Save the Date: GovSummit Returns Wednesday, December 11th!

Hey there, Splunk Community! Exciting news: Splunk’s GovSummit 2024 is returning to Washington, D.C. on ...