All Apps and Add-ons

kBs Indexed per windows EventID for a time period

pstamati
Path Finder

Hi
I wanted to make a report to inform about top event Ids indexed and its size. Can you help me to do this?
Many Thanks

1 Solution

sideview
SplunkTrust
SplunkTrust

I would look at this search. Assuming you are indexing single-byte data, I think it's pretty straightforward. Conversely if you have some multibyte logs in there it'll get a little harder because you cant assume each character is a single byte).

sourcetype=WinEventLog* | eval chars=len(_raw) | stats sum(chars) as bytes by sourcetype, EventCode | sort - bytes

That will give you the total bytes by EventCode, and also broken up by sourcetype.

(If you dont want the sourcetype, just do plain old 'by EventCode'.)

Or if you want a timechart showing volume by EventCode over time, you can switch to the "Advanced Charting" view and run this:

sourcetype=WinEventLog* | eval chars=len(_raw) | timechart sum(chars) by EventCode 

and you'll probably want to switch the 'stack mode' to 'stacked' for this particular chart.

View solution in original post

pstamati
Path Finder

Excellent!. Many Thanks

0 Karma

sideview
SplunkTrust
SplunkTrust

I would look at this search. Assuming you are indexing single-byte data, I think it's pretty straightforward. Conversely if you have some multibyte logs in there it'll get a little harder because you cant assume each character is a single byte).

sourcetype=WinEventLog* | eval chars=len(_raw) | stats sum(chars) as bytes by sourcetype, EventCode | sort - bytes

That will give you the total bytes by EventCode, and also broken up by sourcetype.

(If you dont want the sourcetype, just do plain old 'by EventCode'.)

Or if you want a timechart showing volume by EventCode over time, you can switch to the "Advanced Charting" view and run this:

sourcetype=WinEventLog* | eval chars=len(_raw) | timechart sum(chars) by EventCode 

and you'll probably want to switch the 'stack mode' to 'stacked' for this particular chart.

Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...