<?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 Why is my _TCP_ROUTING configuration not working as expected to send log files to two different Splunk instances? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-TCP-ROUTING-configuration-not-working-as-expected-to/m-p/134607#M27665</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I want to send my log files to two different Splunk instances, but the data is only only being sent to one of the two environments. &lt;/P&gt;

&lt;P&gt;outputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcpout]
defaultGroup=noredirect
disabled = false
maxQueueSize = 500KB

[tcpout:twd104]
server = 10.9.3.35:9997

[tcpout:splunk_prod]
server = splunk-indexer01.rotterdam.local:9997,splunk-indexer02.rotterdam.local:9997
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;inputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log/mule/.../*]
_TCP_ROUTING=splunk_prod
disabled = false
followTail = 0
sourcetype = log4j
index = acc_abkr

[monitor:///var/log/mule/.../*]
_TCP_ROUTING=twd104
disabled = false
followTail = 0
sourcetype = log4j
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The data is only send to splunk_prod.&lt;/P&gt;

&lt;P&gt;Why is this not working?&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jul 2015 08:03:38 GMT</pubDate>
    <dc:creator>arjangoos</dc:creator>
    <dc:date>2015-07-22T08:03:38Z</dc:date>
    <item>
      <title>Why is my _TCP_ROUTING configuration not working as expected to send log files to two different Splunk instances?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-TCP-ROUTING-configuration-not-working-as-expected-to/m-p/134607#M27665</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I want to send my log files to two different Splunk instances, but the data is only only being sent to one of the two environments. &lt;/P&gt;

&lt;P&gt;outputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcpout]
defaultGroup=noredirect
disabled = false
maxQueueSize = 500KB

[tcpout:twd104]
server = 10.9.3.35:9997

[tcpout:splunk_prod]
server = splunk-indexer01.rotterdam.local:9997,splunk-indexer02.rotterdam.local:9997
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;inputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log/mule/.../*]
_TCP_ROUTING=splunk_prod
disabled = false
followTail = 0
sourcetype = log4j
index = acc_abkr

[monitor:///var/log/mule/.../*]
_TCP_ROUTING=twd104
disabled = false
followTail = 0
sourcetype = log4j
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The data is only send to splunk_prod.&lt;/P&gt;

&lt;P&gt;Why is this not working?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2015 08:03:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-TCP-ROUTING-configuration-not-working-as-expected-to/m-p/134607#M27665</guid>
      <dc:creator>arjangoos</dc:creator>
      <dc:date>2015-07-22T08:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my _TCP_ROUTING configuration not working as expected to send log files to two different Splunk instances?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-TCP-ROUTING-configuration-not-working-as-expected-to/m-p/134608#M27666</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;My guess is that Splunk ignores your second input because all data is already read with the first input since both inputs are matching the same monitoring pattern. &lt;/P&gt;

&lt;P&gt;You don't want two Inputs for the same source. What might help you is a second target group for your input. &lt;/P&gt;

&lt;P&gt;What you need is something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcpout]
defaultGroup= &amp;lt;target_group1&amp;gt; , &amp;lt;target_group2&amp;gt;

[tcpout:&amp;lt;target_group1&amp;gt;]
server= &amp;lt;receiving_server1&amp;gt; , &amp;lt;receiving_server2&amp;gt;

[tcpout:&amp;lt;target_group2&amp;gt;]
server= &amp;lt;receiving_server3&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.4/Forwarding/Configureforwarderswithoutputs.confd"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.4/Forwarding/Configureforwarderswithoutputs.confd&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2015 14:07:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-TCP-ROUTING-configuration-not-working-as-expected-to/m-p/134608#M27666</guid>
      <dc:creator>hgrow</dc:creator>
      <dc:date>2015-07-22T14:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my _TCP_ROUTING configuration not working as expected to send log files to two different Splunk instances?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-TCP-ROUTING-configuration-not-working-as-expected-to/m-p/134609#M27667</link>
      <description>&lt;P&gt;this is not working, the data gets sent to one target-group but not to the two groups at the same time.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2015 09:31:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-TCP-ROUTING-configuration-not-working-as-expected-to/m-p/134609#M27667</guid>
      <dc:creator>arjangoos</dc:creator>
      <dc:date>2015-07-23T09:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my _TCP_ROUTING configuration not working as expected to send log files to two different Splunk instances?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-TCP-ROUTING-configuration-not-working-as-expected-to/m-p/134610#M27668</link>
      <description>&lt;P&gt;That's strange. I wasnt able to rebuild your problem but according to the docs its what you need for &lt;STRONG&gt;data cloning&lt;/STRONG&gt;. &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Data cloning&lt;/P&gt;

&lt;P&gt;To perform data cloning, specify multiple target groups, each in its own stanza. In data cloning, the forwarder sends copies of all its events to the receivers in two or more target groups. Data cloning usually results in similar, but not necessarily exact, copies of data on the receiving indexers. Here's an example of how you set up data cloning:&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcpout]
defaultGroup=indexer1,indexer2

[tcpout:indexer1]
server=10.1.1.197:9997

[tcpout:indexer2]
server=10.1.1.200:9997
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;The forwarder will send duplicate data streams to the servers specified in both the indexer1 and indexer2 target groups. &lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.4/Forwarding/Configureforwarderswithoutputs.confd"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.4/Forwarding/Configureforwarderswithoutputs.confd&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Can you post your changed  inputs.conf and outputs.conf ?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2015 13:54:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-TCP-ROUTING-configuration-not-working-as-expected-to/m-p/134610#M27668</guid>
      <dc:creator>hgrow</dc:creator>
      <dc:date>2015-07-23T13:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my _TCP_ROUTING configuration not working as expected to send log files to two different Splunk instances?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-TCP-ROUTING-configuration-not-working-as-expected-to/m-p/134611#M27669</link>
      <description>&lt;P&gt;Hi arjangoos.&lt;/P&gt;

&lt;P&gt;I'm not sure if your problem is stil relevant, but i've done some tests. Here is a working configuration:&lt;/P&gt;

&lt;P&gt;inputs.conf &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///opt/splunkdata/testdata.log]
disabled = false
index = main
sourcetype = test
_TCP_ROUTING = indexer1,indexer2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;outputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcpout]
indexAndForward=true
defaultGroup=discard

[tcpout:indexer1]
server=192.168.111.246:9997

[tcpout:indexer2]
server=192.168.111.245:9997

[tcpout:discard]
disabled = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In addition to my previous posts you define multiple tcpout_groups for the  _TCP_ROUTING directly in your input. In this way you can use default routing functionality within the default stanza &lt;A href="https://community.splunk.com/like%20your%20example" target="_blank"&gt;tcpout&lt;/A&gt; for something else.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 06:49:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-TCP-ROUTING-configuration-not-working-as-expected-to/m-p/134611#M27669</guid>
      <dc:creator>hgrow</dc:creator>
      <dc:date>2020-09-29T06:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my _TCP_ROUTING configuration not working as expected to send log files to two different Splunk instances?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-TCP-ROUTING-configuration-not-working-as-expected-to/m-p/134612#M27670</link>
      <description>&lt;P&gt;I agree with hgrow. I don't think you can have 2 stanzas dealing with the same log source.&lt;/P&gt;

&lt;P&gt;So instead of using  _TCP_ROUTING in inputs, use props and transforms.&lt;/P&gt;

&lt;P&gt;props.conf (Not sure about the source.)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::///var/log/mule/.../*]
TRANSFORMS-routingto2splunks = log_to_splunk1, log_to_splunk2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[log_to_splunk1]
REGEX = .
DEST_KEY = _TCP_ROUTING
FORMAT = splunk_prod

[log_to_splunk2]
REGEX = .
DEST_KEY = _SYSLOG_ROUTING
FORMAT = twd104
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 06:48:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-TCP-ROUTING-configuration-not-working-as-expected-to/m-p/134612#M27670</guid>
      <dc:creator>dfronck</dc:creator>
      <dc:date>2020-09-29T06:48:03Z</dc:date>
    </item>
  </channel>
</rss>

