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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...