r/Splunk•
TalAiming

Hoping for some more good help here. props/transforms

props&transforms

Hi Guys

I have a situation where I need to exclude certain workstation/computer names from windows logs. as they are hitting a shared DC. I need to make sure they DON'T index on index A but DO index on index B.

the logs traverse over the same heavy forwarder.

so can I do it this way

inputs.conf exclude

[default] blacklist = ComputerName "Remove-me*"

or is this something I have to do through props/ transforms.conf like the following here

props.conf

[host::Remove-me1] TRANSFORMS-remove1 = remove_host [host::Remove-me2] TRANSFORMS-remove2 = remove_host [host::Remove-me3] TRANSFORMS-remove3 = remove_host

transforms.conf

[remove_host] REGEX = . DEST_KEY = queue FORMAT = nullQueue

if so, how do I assign that to a specific index??

Posted Mar 24, 2022, 7:45 PM UTC

52
TalAimingOP•

so incase anyone else is stuck. solved my own issue by doing it this way.

basically I was trying to take logs from one domain controller and have it forward windows event logs to two different indexes based off hostname..... you could probably filter whatever you want since it's raw.....

but I needed this due to dumb rbac shit

[update_< only X hostnames to new index change all this>]

SOURCE_KEY = _raw #probably needed....

REGEX = <REGEX FOR HOSTNAMES HERE > #have fun.... regex101

DEST_KEY = _MetaData:Index # you can change this for source types whatever bro

FORMAT = <destination index> #basically this is the index you want whatever your regex is to end up in.

 

I also needed to add the following  (not 100% sure if this is required or not)  because I saw it was only hitting 1 host

 

[host::<host= in splunk from log source>]   -- DC logs were taking too cause it's stupid windows.

TRANSFORMS-updateidnex2 = <props index name> sorry this is a dark color. copy and paste error I'm too lazy to fix cause I'm on my phone.

2
halr9000:splunk: | search "memes" | top 10•

We should totally make this easier. Some of it is coming via this idea.

1