Splunk Search

aggregate hourly events

elaine0102
Explorer

Hi, how can I get aggregate hourly events. The search command using "avg"?
Guide please. Thankyou.

Tags (1)
0 Karma

Ayn
Legend

So, let's say you have events that represent tweets (one event per tweet) and you want to get a average of some time period on how many tweets are made daily.

First of all get a count per day, then use the numbers you just got to get your average.

(some search that finds your tweet events) | timechart span=1d count | stats avg(count)
0 Karma

elaine0102
Explorer

Yes, I would need some numbers to create some charts for my events. My application is actually displaying my company's Twitter information. I thought of displaying on average, how many tweets my company tweets daily.

Mathematics term I know is to add all the tweets daily and divide by number of days.

However, in Splunk's language, I do not know how. I look at Splunk documentation for search language however I do not understand the part where they used "avg".

0 Karma

Ayn
Legend

The information you provide isn't sufficient to give any meaningful answer. How do you mean what your events are, "on average"? Do you want some kind of number, and if so, which?

0 Karma

elaine0102
Explorer

I actually want to know on average what is my daily/hourly/monthly events. Can you guide me on either 1. Thank you.

By chance if you have any idea about this thread: http://splunk-base.splunk.com/answers/65303/issue-regarding-date_wday

0 Karma

Ayn
Legend

Provide more details on your scenario please. Thankyou.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...