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!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...