Splunk Search

How to get average event size...

a212830
Champion

Is there a quick way (metadata? tstats?) to get the average event size for my events? Querying every event would take forever...

0 Karma

sloshburch
Splunk Employee
Splunk Employee

license_usage.log shows the size of the events...I usually use that so long as none were skipped.

0 Karma

Runals
Motivator

If you wanted a quick and dirty method you could do some math on the metrics logs (# events / size) but the larger your environment the less I trust the metrics log /shrug.

0 Karma

somesoni2
Revered Legend

AFAIK, Size of raw data is not stored in any metadata/tsidx, so only option would be to query raw data. May be run for a smaller period to avoid very long running query.

your base search | eval size=len(_raw) | stats avg(size)

twinspop
Influencer

Yep. Event size was important to my system at one point so I set-up an accelerated data model using the same eval you have shown above. With the ADM it's easy to grab stats based on sourcetype, source, index and/or host. Once the need passed, I disabled the acceleration.

0 Karma

a212830
Champion

Thanks. Is that bytes?

0 Karma

somesoni2
Revered Legend

Yes.......

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...