Splunk Search

How can I make a table for multiple Windows Events ?

itrimble1
Path Finder

How can I make a table for multiple Windows Events ? This search gives me good results for one Event Code, but I have multiple Event IDs. Trying to do some tuning.

index=wineventlog source=WinEventLog:security EventCode=4624
 | fields _raw 
 | eval esize=len(_raw) 
 | stats count as count avg(esize) as avg 
 | eval bytes=count*avg 
 | eval kb=bytes/1024 
 | eval mb=round(kb/1024,2) 
 | stats values(kb) as KB, values(mb) AS MB
Tags (3)
0 Karma

woodcock
Esteemed Legend

Like this:

index=wineventlog source=WinEventLog:security
| fields _raw 
| eval esize=len(_raw) 
| stats count AS count avg(esize) AS avg 
| eval bytes=count*avg 
| eval kb=bytes/1024 
| eval mb=round(kb/1024,2) 
| stats values(kb) AS KB, values(mb) AS MB BY EventCode

Also be aware that convert and has some things to do the bytes->whatever things.

0 Karma

tiagofbmm
Influencer

How about splitting by EventCode:

 index=wineventlog source=WinEventLog:security 
  | fields _raw 
  | eval esize=len(_raw) 
  | stats count as count avg(esize) as avg by EventCode
  | eval bytes=count*avg 
  | eval kb=bytes/1024 
  | eval mb=round(kb/1024,2) 
  | stats values(kb) as KB, values(mb) AS MB by EventCode
0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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