Getting Data In

Forward subset of logs via _TCP_ROUTING

sonicZ
Contributor

Using a heavy forwarder I'm having some issues using the _TCP_ROUTING examples posted in splunk docs and some splunk base answers.
I am just trying to forward a specific sourcetype log type to another forwarder, Is this correct or is there anything i am doing wrong?

in props.conf
[somesourcetype]
TRANSFORMS-log_subset = some_logs

In transforms.conf
[some_logs]
REGEX = .
DEST_KEY=_TCP_ROUTING
FORMAT=some_logs_subset

In outputs.conf
[tcpout:some_logs_subset]
server=serverip:port
Tags (2)

Drainy
Champion

Your config looks fine to me.

Have you correctly defined the input on the other side and tested connectivity?

0 Karma

sonicZ
Contributor

Also another oddity is if i specify
[tcp://9997]
instead of splunktcp the data comes in indexed but since its still coming in cooked.

--splunk-cooked-mode-v3--\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 etc...

So connectivity seems fine just seems like this instance is not handling cooked "spunktcp" data correctly.

0 Karma

sonicZ
Contributor

I should also mention this is a spunk 4.3.3 instance forwarding to splunk 5.0.3

0 Karma

sonicZ
Contributor

I basically just have this on the receiving forwarder
connectivity is fine in splunkd logs from forwarder to forwarder and via port connect tests(telnet)

[splunktcp://9997]
connection_host = dns
index = iseclog_core
sourcetype = logger_cef

0 Karma

lmyrefelt
Builder

you can do it with a combination of inputs and outputs.

inputs.conf

[monitor:///some/path/to/some/files/]
_TCP_ROUTING = my_new_route
source =
sourcetype =
host =
blacklist =

outputs.conf

[tcpout]
defaultGroup = our_default_route

[tcpout:out_default_route]
server = 0.0.0.0:0000

[tcpout:our_new_route]
server = 1.1.1.1:1111

0 Karma

sonicZ
Contributor

This is a heavy forwarder receiving multiple inputs on different ports, so i am using props and transforms .conf files specified in original post.

0 Karma

lmyrefelt
Builder

what kind of forwarder are you using? Can it be that you need another kind of forwarder (ie. heavy) to what u want?

0 Karma

sonicZ
Contributor

The only problem i have is we have an input on
[splunktcp:port]

That basically has a lot of data coming in from, the sourcetype is mixed in with that data so we only want to forward data that is of that particular sourcetype, preferably not changing the inputs.conf ports

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

Ready to make your IT operations smarter and more efficient? Discover how to automate Splunk alerts with Red ...