Getting Data In

Need help routing all Windows events to syslog but only selected Event IDs to Splunk

umd06
Engager

 

I’m trying to split my Windows events so that:

  • All events get forwarded to a syslog server.

  • Only certain Event IDs (ex: 5156) get indexed in Splunk.

    Here’s what I’ve done so far:

    props.conf

     
    [source::XmlWinEventLog...]
    TRANSFORMS-win = send_to_syslog

    transforms.conf

     

    [send_to_syslog]
    REGEX = .
    DEST_KEY = _SYSLOG_ROUTING
    FORMAT = my_syslog_group

    outputs.conf

     

     
     

     

    [syslog:my_syslog_group]
    server = loghost.example.com:514

    That part works — all events are being forwarded to syslog.

    But when I try to add a second transform to only index a few events, Splunk still indexes everything:

    props.conf

     

    [source::XmlWinEventLog...]
    TRANSFORMS-win = send_to_syslog, filter_to_splunk

    transforms.conf

     
    [filter_to_splunk]
    REGEX = (5156)
    DEST_KEY = _TCP_ROUTING
    FORMAT = my_splunk_group

     

    I also tried nullQueue first, then forwarding, but either:

    • Everything gets filtered out from both syslog and Splunk, or

    • Everything still goes to both syslog and Splunk.

      In short:
      👉 I want all events → syslog
      👉 Only some events → Splunk

      But I can’t get the routing to separate correctly.

    •  

  •  

Labels (3)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @umd06 ,

did you tried to crete two inputs?

  • one for all logs but not EventCode=5156 (blacklisting this EventCode), assigning only _SYSLOG_ROUTING
  • one only for EventCode=5156 log (whitelisting this EventCode)
  • , assigning both _SYSLOG_ROUTING and _TCP_ROUTING

Ciao.

Giuseppe 

0 Karma

PickleRick
SplunkTrust
SplunkTrust

I assume you're talking about HF.

Try setting the _TCP_ROUTING to a non-existent group for the events you want to drop.

0 Karma
Get Updates on the Splunk Community!

Splunk Enterprise Security(ES) 7.3 is approaching the end of support. Get ready for ...

Hi friends!    At Splunk, your product success is our top priority. With Enterprise Security (ES), we're here ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...