Splunk Search

Saving License on Windows Events - Regex "This event..."

dieguiariel
Path Finder

Hi! i've been trying to regex some part of the windows events to save license. Many windows events contains a large part of text that begins with "This event is generated".

I've edited props.conf:

[source::WinEventLog:Security]
TRANSFORMS-removedescription = removeEventDesc1

and transforms.conf:

[removeEventDesc1]
LOOKAHEAD = 16128
REGEX = (?msi)(.*)This event is generated
DEST_KEY = _raw
FORMAT = $1

(based on this link https://www.hurricanelabs.com/splunk-tutorials/windows-event-log-filtering-design-in-splunk)

But isn't working.

There is another way to do this?

I've installed forwarders on my windows systems, and already blacklisted events with inputs.conf (that works)

Thanks in advance and sorry for my english, im from Paraguay.

Labels (1)
Tags (1)
0 Karma
1 Solution

dieguiariel
Path Finder

Thanks, ive installed the addon, create a serverclass with some windows and deploy the app to the servers and its working. It seems that this has changed also the format of logs to xml. 

thanks!

View solution in original post

0 Karma

thambisetty
SplunkTrust
SplunkTrust

If you have already blacklisted on universal forwarder why do you want to do it at heavy forwarder level.

the best recommended way of blacklisting windows events is using universal forwarder.

————————————
If this helps, give a like below.

dieguiariel
Path Finder

So this regex must be on the universal forwarder app folder? I will try this too. Thanks for your reply

0 Karma

thambisetty
SplunkTrust
SplunkTrust

Okay. Please like the answer if it solves your questions.

————————————
If this helps, give a like below.

dieguiariel
Path Finder

i've manually edit the universal forwarder files on the windows machine but seems that this regex need the Windows addon, without it doesnt make any difference. 

0 Karma

thambisetty
SplunkTrust
SplunkTrust

not really you just need inputs.conf, you don't need to push complete TA.

for example:

[WinEventLog://Security]
disabled = 0
index = windows
#blacklist1 = EventCode=%^4663$% # example blacklist all 4663 event codes
#blacklist6 = EventCode = "4663" Message = "Process Name:\s+\\Device\\HarddiskVolume6\\Tomcat\\bin\\Tomcat9.exe" # blacklist Tomcat from EventCode 4663

Note: blacklists statements are commented

https://docs.splunk.com/Documentation/Splunk/8.0.5/Data/MonitorWindowseventlogdata#Create_advanced_f...

————————————
If this helps, give a like below.
0 Karma

dieguiariel
Path Finder

Yes, i've successfully blacklisted and whitelisted events with eventcoodes just with inputs.conf, but i couldn't "filter" the text inside the event, i need one eventcode but i don't need the text inside the event that begins with "this event is generated..."

Only pushing the complete TA from windows i been able to do that. I get the event but not the part with "This event is generated..."

0 Karma

richgalloway
SplunkTrust
SplunkTrust

A slightly simpler method (from Splunk Add-on for Windows) uses SEDCMD

SEDCMD-clean_info_text_from_winsystem_events_this_event = s/This [Ee]vent is generated[\S\s\r\n]+$//g

 

---
If this reply helps you, Karma would be appreciated.

dieguiariel
Path Finder

Hi, thanks for your response, I have a master server and an indexer server separately. I've installed the deployment server on the master.  The Splunk Add-on for Windows must be installed in this case on both? 

(based on https://docs.splunk.com/Documentation/WindowsAddOn/8.0.0/User/Install )

And later push the addon to the universal forwarders with the deployment server.

I will try this.

 

0 Karma

dieguiariel
Path Finder

Thanks, ive installed the addon, create a serverclass with some windows and deploy the app to the servers and its working. It seems that this has changed also the format of logs to xml. 

thanks!

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 ...