Splunk Search

Top 10 event counts per day

Volto
Path Finder

I have a search that gives me the event counts for each host every hour and compares that count against a running average of event counts for each host. When a host has a higher event count than the average for that hour it is marked as an outlier. I want to table the top 10 outliers based on the difference between the event count at that hour and the running average for each day.

So I'll have 10 hosts for Monday, Tuesday, Wednesday, etc. Is something like this possible? I have the difference already in my data set.

Thanks for the help.

Tags (2)
0 Karma

yannK
Splunk Employee
Splunk Employee

example with an eval to calculate the difference, and sort the hosts


mysearchthatcalculatesall | stats max(event) AS current avg(average_number_of_events) AS average by host date_mday
| eval outlier_count=current-average | where outlier>0
| sort -outlier | head 10

Get Updates on the Splunk Community!

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureThursday, March 27, 2025  |  11AM PST / 2PM EST | Register NowStep boldly ...

Splunk AppDynamics with Cisco Secure Application

Web applications unfortunately present a target rich environment for security vulnerabilities and attacks. ...