\etc\system\local\transforms.conf
[drop4768OK]
REGEX = EventCode=4768(.|\t|\r|\n)*Result.*Code.*0x0
DEST_KEY = queue
FORMAT = nullQueue
\etc\system\local\props.conf
[source::WinEventLog:Security]
TRANSFORMS-set = drop4768OK
After a reboot, events with Event Code 4768 and Result Code 0x0 are still being indexed. What am I doing wrong?
First of all, you should have a better RegEx, like ^EventCode=4768[\S\s\r\n]+Result\s*Code:\s+0x0\D
. Even so, yours should work. I would try using a sourcetype-based
stanza header, instead of your source-based
one. Again, what you have should work but since it isn't, let's try something else.
Regex isn't my strong suit. I usually mess around with it in a regex "calculator" to ensure it matches correctly before deploying it.
Could you provide a few sample events containing both; events you'd like to keep and events you'd like to discard?
The events have to meet both criteria? i.e. Event code AND result code?
Thanks
https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid=4768
Yes, discard events with EventID 4768 AND result code 0x0, keep the rest.
You shouldn't be putting stuff in $SPLUNK_HOME/etc/system/local
; you should be creating your own app based on either the sourcetype or the splunk-node type (e.g. Indexer). In any case, if you are doing a sourcetype override/overwrite, you must use the ORIGINAL values NOT the new value (you are not, so that's not your problem), then you must deploy this to the first full instance(s) of Splunk that handles the events (usually either the HF-tier, if you use that, or your Indexer tier), restart all Splunk instances there, send in new events (old events will stay broken), then test using _index_earliest=-5m to be absolutely certain that you are only examining the newly indexed events. I think that last bit is your problem.
So you're saying the transforms should go in the deployed app? The UF discards the event before even sending it?
Nope, I am saying it has to go on the Indexers (probably), but DEFINITELY NOT on the UF.
Ok, it's on the Indexer. Everything's been restarted. I understand only new events will be affected by the change.
Right, so is it working? If so, come back and click Accept
to close the question.
It is not working. I'll try putting the transforms in the search app.
NO! Not in anybody else's stuff. Create your own app in `$SPLUNK_HOME/etc/apps//default/{transforms,props}.conf.
Alright. I've never seen this recommended in the 2 years I've worked with Splunk Engineers, Splunk Answers, or Splunk Support. Unless it's specifically related to certain config changes?