<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic how to filter and forward to multiple destination in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/how-to-filter-and-forward-to-multiple-destination/m-p/326821#M60723</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I tried this configuration but it ended up badly, there were no more log on Splunk:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[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
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I also tried to reverse the TRANSFORMS-routing order and there was less logs than usual.&lt;BR /&gt;
the regex works and the inputs.conf I have set&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  connection_host = none
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is it possible that my transform-host is not applied before my transform-routing so that the  SOURCE_KEY = MetaData:Host is useless?&lt;BR /&gt;
Or do I need to set a specific order in the Transform-routing??&lt;/P&gt;

&lt;P&gt;back to the original config which actually works:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TRANSFORMS-routing = Routing-PA

[Routing-PA]
REGEX=.
DEST_KEY=_TCP_ROUTING
FORMAT= Routing-PA, indexersRouting
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 13 Apr 2017 09:00:25 GMT</pubDate>
    <dc:creator>sassens1</dc:creator>
    <dc:date>2017-04-13T09:00:25Z</dc:date>
    <item>
      <title>how to filter and forward to multiple destination</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-filter-and-forward-to-multiple-destination/m-p/326821#M60723</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I tried this configuration but it ended up badly, there were no more log on Splunk:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[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
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I also tried to reverse the TRANSFORMS-routing order and there was less logs than usual.&lt;BR /&gt;
the regex works and the inputs.conf I have set&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  connection_host = none
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is it possible that my transform-host is not applied before my transform-routing so that the  SOURCE_KEY = MetaData:Host is useless?&lt;BR /&gt;
Or do I need to set a specific order in the Transform-routing??&lt;/P&gt;

&lt;P&gt;back to the original config which actually works:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TRANSFORMS-routing = Routing-PA

[Routing-PA]
REGEX=.
DEST_KEY=_TCP_ROUTING
FORMAT= Routing-PA, indexersRouting
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Apr 2017 09:00:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-filter-and-forward-to-multiple-destination/m-p/326821#M60723</guid>
      <dc:creator>sassens1</dc:creator>
      <dc:date>2017-04-13T09:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to filter and forward to multiple destination</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-filter-and-forward-to-multiple-destination/m-p/326822#M60724</link>
      <description>&lt;P&gt;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. &lt;/P&gt;

&lt;P&gt;Maybe you try to create two tcpout group, &lt;/P&gt;

&lt;P&gt;If  defaultGroup is indexerRouting and another tcpout group is Routing-PA, can't you make use of the working example (  FORMAT= Routing-PA, indexersRouting ) ? &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:43:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-filter-and-forward-to-multiple-destination/m-p/326822#M60724</guid>
      <dc:creator>Masa</dc:creator>
      <dc:date>2020-09-29T13:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to filter and forward to multiple destination</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-filter-and-forward-to-multiple-destination/m-p/326823#M60725</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;sorry but I don't get it, you're probably right about field overriding but how can I avoid it??&lt;BR /&gt;
my goal is to forward all the logs to my indexers and all except a specific host to an external log collector.&lt;/P&gt;

&lt;P&gt;I already have 2 different tcpout groups with different destination IPs&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcpout]
defaultGroup = indexersRouting
autoLBFrequency = 30
forceTimebasedAutoLB = true
autoLB = true

[tcpout:Routing-PA]
server = 10.175.1.2:514
sendCookedData = false
disabled = false
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Apr 2017 12:21:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-filter-and-forward-to-multiple-destination/m-p/326823#M60725</guid>
      <dc:creator>sassens1</dc:creator>
      <dc:date>2017-04-20T12:21:01Z</dc:date>
    </item>
  </channel>
</rss>

