Splunk Search

timechart count by and timechart daily average

transgaming
Explorer

Given the following Splunk query, I'm able to create a nice line chart.

... | timechart span=7d count by my_field

I'd like to create a smoother line chart by instead charting the daily average count. How do I do that?

Thanks.

Tags (1)
0 Karma

transgaming
Explorer

This is what I was looking for:

... | timechart span=1d count by my_field | bucket _time span=1w | stats avg(val1), avg(val2), avg(val3) by _time

BobM
Builder

a change span=7d to span=1d to get daily granularity.

You can also use streamstats to smooth it more if that is needed.

transgaming
Explorer

Changing the span to daily actually makes the line report less smooth. I'll check out streamstats. Thanks.

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...