Getting Data In

Whats the best way to blacklist a Windows event code?

mrtolu6
Path Finder

I have over 300 Universal forwarders and I'm getting several eventcode=5156 events errors. Is there a way to blacklist this event on a heavy forwarder? If not, what would be the best approach for blacklisting this event code?

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi mrtolu6,
the best way is to insert the blacklisted value in your TA distributed to all the Universal Forwarders

blacklist = EventCode\=5156

(see https://docs.splunk.com/Documentation/Splunk/6.5.0/Admin/Inputsconf)

Otherwise you could filter these events in your Heavy Forwarder:

props.conf

 [your_sourcetype]
 TRANSFORMS-set-remove_headers=set_OK,set_nullqueue

transforms.conf

 [set_nullqueue]
 REGEX=EventCode\=5156
 DEST_KEY=queue
 FORMAT=nullQueue

 [set_OK]
 REGEX=.
 DEST_KEY = queue
 FORMAT = indexQueue

Bye.
Giuseppe

mrtolu6
Path Finder

Thanks Giuseppe for your response. I tried to do it on the heavy fwd but it did not work. Please see below to see what i inserted in the props.conf and transforms.conf file.

props.conf

[WinEventLog:Security]
TRANSFORMS-set-remove_headers=set_OK,set_nullqueue

transforms.conf

[set_nullqueue]
REGEX=EventCode=5156
DEST_KEY=queue
FORMAT=nullQueue

[set_OK]
REGEX=.
DEST_KEY = queue
FORMAT = indexQueue
0 Karma

mrtolu6
Path Finder

please disregard, it did work. Thanks for your help.

0 Karma

ppablo
Retired

Hi @mrtolu6

Glad you found a working solution through @cusello. Please don't forget to resolve the post by clicking "Accept" directly below his answer, and upvote his answer for helping you out.

Patrick

Get Updates on the Splunk Community!

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...