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!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...