Getting Data In

In a heavy forwarder, how do I select specific windows event ids and reparse them as single line events?

pete222
New Member

I have windows event logs coming into a heavy forwarder, which I don’t need to index. All I need to do is select a couple of windows event ids, reparse them and send them to a 3rd party as single line events. I’ve read a lot of articles about forwarding and similar types of posts, but I cannot seem to get this to work. Any help would be greatly appreciated!
This is what I have so far:

inputs.conf 
[tcp://9997]
sourcetype = for3rdparty
queueSize = 50KB
persistentQueueSize=200MB
queue = parsingQueue

outputs.conf
[tcpout:3rdparty]
server = 1.1.1.1:1111
sendCookedData = false

props.conf
[for3rdparty]
SEDCMD-rmlines = s/[\n\t\r]/ /g
TRANSFORMS-1capture = capture_for_3rdparty
TRANSFORMS-2reparse = reparse_for_3rdparty
TRANSFORMS-3route = route_to_3rdparty

transforms.conf
[capture_for_3rdparty]
REGEX=(?ms)^EventCode=(111|222|333)(.*)
DEST_KEY=_raw

[reparse_for_3rdparty]
REGEX = <regex>
FORMAT = $1::$2
DEST_KEY = _raw

[route_to_3rdparty]
REGEX =.
DEST_KEY=_TCP_ROUTING
FORMAT= for3rdparty
0 Karma
1 Solution

sudosplunk
Motivator

Is there any reason not using _TCP_ROUTING in inputs.conf? I meant, does below implementation works?

inputs.conf:

[tcp://9997]
sourcetype = for3rdparty
whitelist = 111, 222, 333
_TCP_ROUTING = for3rdparty
persistentQueueSize=200MB

Props.conf:

[for3rdparty]
SEDCMD-rmlines = s/[\n\t\r]/ /g

Outputs.conf:

[tcpout:for3rdparty]
server = 1.1.1.1:1111
sendCookedData = false

View solution in original post

0 Karma

sudosplunk
Motivator

Is there any reason not using _TCP_ROUTING in inputs.conf? I meant, does below implementation works?

inputs.conf:

[tcp://9997]
sourcetype = for3rdparty
whitelist = 111, 222, 333
_TCP_ROUTING = for3rdparty
persistentQueueSize=200MB

Props.conf:

[for3rdparty]
SEDCMD-rmlines = s/[\n\t\r]/ /g

Outputs.conf:

[tcpout:for3rdparty]
server = 1.1.1.1:1111
sendCookedData = false
0 Karma

pete222
New Member

Hi
Apologies for the slow response. I did as you suggested, used _TCP_ROUTING in inputs.conf and everything works as it should. Thanks!

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Automated Threat Analysis: Available in ES Premier

Automated Threat Analysis: Centralize and Accelerate Phishing Investigations in Splunk Enterprise ...

What’s New in Splunk AI: Volume 02

Welcome to the second edition of “What’s New in Splunk AI” where we look at the latest and greatest updates, ...

Best Practices: Splunk auto adjust pipeline queue

When you enable autoAdjustQueue in Splunk, maxSize should be understood as the queue size Splunk starts with ...