Getting Data In

how to filter and forward to multiple destination

sassens1
Path Finder

Hello,

I tried this configuration but it ended up badly, there were no more log on Splunk:

[pan:log]
TRANSFORMS-host = paloalto_hostoverride
TRANSFORMS-routing = IndexersRouting, Routing-PA-filterhost

[Routing-PA-filterhost]
SOURCE_KEY = MetaData:Host
REGEX=^(?!(GSBDCL-FW950)$).*$
DEST_KEY=_TCP_ROUTING
FORMAT= Routing-PA

[IndexersRouting]
REGEX=.
DEST_KEY=_TCP_ROUTING
FORMAT= indexersRouting

I also tried to reverse the TRANSFORMS-routing order and there was less logs than usual.
the regex works and the inputs.conf I have set

  connection_host = none

Is it possible that my transform-host is not applied before my transform-routing so that the SOURCE_KEY = MetaData:Host is useless?
Or do I need to set a specific order in the Transform-routing??

back to the original config which actually works:

TRANSFORMS-routing = Routing-PA

[Routing-PA]
REGEX=.
DEST_KEY=_TCP_ROUTING
FORMAT= Routing-PA, indexersRouting
0 Karma

sassens1
Path Finder

Hi,

sorry but I don't get it, you're probably right about field overriding but how can I avoid it??
my goal is to forward all the logs to my indexers and all except a specific host to an external log collector.

I already have 2 different tcpout groups with different destination IPs

[tcpout]
defaultGroup = indexersRouting
autoLBFrequency = 30
forceTimebasedAutoLB = true
autoLB = true

[tcpout:Routing-PA]
server = 10.175.1.2:514
sendCookedData = false
disabled = false
0 Karma

Masa
Splunk Employee
Splunk Employee

You are overriding _TCP_ROUTING key. It is same concept as normal field. If you use same field name twice for same event in transforms.conf, the last field value would be taken. It is not appending.

Maybe you try to create two tcpout group,

If defaultGroup is indexerRouting and another tcpout group is Routing-PA, can't you make use of the working example ( FORMAT= Routing-PA, indexersRouting ) ?

Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...