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!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...