Splunk Search

How to find the average count of events for a timechart?

robertlabrie
Path Finder

This sounds so easy but I can't seem to figure it out. Or maybe it's just ridiculous and there is a better way.

So I have

index=iis | timechart count by cs_uri_stem

And that's great, but what if I want to smooth out the timechart with an average? Or maybe just plot the deltas? Doing avg(count(_raw)) doesn't cut the mustard. Basically I want to try and stomp down the occasional spikes (which yes need attention in some circumstances) and just get an idea if hitcount is trending up. Any ideas?

Tags (3)
0 Karma

Sukisen1981
Champion

| timechart span=1h count as events | eventstats sum(events) as z| eventstats count(events) as y |eval average=round(z/y,2)|fields

Ultimately the average = sum/count

0 Karma

Sukisen1981
Champion

| timechart span=1h count as events | eventstats sum(events) as z| eventstats count(events) as y |eval average=round(z/y,2)|fields

0 Karma

aljohnson_splun
Splunk Employee
Splunk Employee
0 Karma

aljohnson_splun
Splunk Employee
Splunk Employee

Have you looked at X11 ? Or trendline ? Trendline has exponential moving averages as well as weighted moving averages.

0 Karma
Get Updates on the Splunk Community!

Splunk is Nurturing Tomorrow’s Cybersecurity Leaders Today

Meet Carol Wright. She leads the Splunk Academic Alliance program at Splunk. The Splunk Academic Alliance ...

Part 2: A Guide to Maximizing Splunk IT Service Intelligence

Welcome to the second segment of our guide. In Part 1, we covered the essentials of getting started with ITSI ...

Part 1: A Guide to Maximizing Splunk IT Service Intelligence

As modern IT environments continue to grow in complexity and speed, the ability to efficiently manage and ...