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!

Troubleshooting the OpenTelemetry Collector

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

Adoption of Infrastructure Monitoring at Splunk

  Splunk's Growth Engineering team showcases one of their first Splunk product adoption-Splunk Infrastructure ...

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...