<?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 configure inputs.conf to send data from 1 directory to 2 different clusters with different index/sourcetype in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293567#M55848</link>
    <description>&lt;P&gt;We have a scenario where we need to forward data from 1 directory to 2 different indexer clusters. While this is achievable through TCP Routing in inputs.conf, I believe the solution will only work if everything else remains the same in the monitoring stanza.&lt;BR /&gt;
We need to send data to the 2 clusters with different index/sourcetype configuration. Is this possible using the same inputs.conf file?&lt;/P&gt;

&lt;P&gt;We have observed that setting up 2 different stanzas for the same monitored directory results in only one of the stanzas being respected. Below is a description of the configuration.&lt;/P&gt;

&lt;P&gt;[monitor:///A/B/C]&lt;BR /&gt;
index = index1&lt;BR /&gt;
sourcetype = st1&lt;BR /&gt;
_TCP_ROUTING = cluster1&lt;/P&gt;

&lt;P&gt;[monitor:///A/B/C]&lt;BR /&gt;
index = index2&lt;BR /&gt;
sourcetype = st2&lt;BR /&gt;
_TCP_ROUTING = cluster2&lt;/P&gt;

&lt;P&gt;The above configuration resulted in the data only flowing to cluster2.  We tried differentiating the 2 stanzas by putting asterisk at the end of the directory name, but it didn't make a difference.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 17:32:06 GMT</pubDate>
    <dc:creator>tusharsaran1</dc:creator>
    <dc:date>2020-09-29T17:32:06Z</dc:date>
    <item>
      <title>How to configure inputs.conf to send data from 1 directory to 2 different clusters with different index/sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293567#M55848</link>
      <description>&lt;P&gt;We have a scenario where we need to forward data from 1 directory to 2 different indexer clusters. While this is achievable through TCP Routing in inputs.conf, I believe the solution will only work if everything else remains the same in the monitoring stanza.&lt;BR /&gt;
We need to send data to the 2 clusters with different index/sourcetype configuration. Is this possible using the same inputs.conf file?&lt;/P&gt;

&lt;P&gt;We have observed that setting up 2 different stanzas for the same monitored directory results in only one of the stanzas being respected. Below is a description of the configuration.&lt;/P&gt;

&lt;P&gt;[monitor:///A/B/C]&lt;BR /&gt;
index = index1&lt;BR /&gt;
sourcetype = st1&lt;BR /&gt;
_TCP_ROUTING = cluster1&lt;/P&gt;

&lt;P&gt;[monitor:///A/B/C]&lt;BR /&gt;
index = index2&lt;BR /&gt;
sourcetype = st2&lt;BR /&gt;
_TCP_ROUTING = cluster2&lt;/P&gt;

&lt;P&gt;The above configuration resulted in the data only flowing to cluster2.  We tried differentiating the 2 stanzas by putting asterisk at the end of the directory name, but it didn't make a difference.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:32:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293567#M55848</guid>
      <dc:creator>tusharsaran1</dc:creator>
      <dc:date>2020-09-29T17:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure inputs.conf to send data from 1 directory to 2 different clusters with different index/sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293568#M55849</link>
      <description>&lt;P&gt;have a look at this answer&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/108295/sending-two-inputs-from-one-universal-forwarder-to-two-different-indexers-not-load-balancing.html"&gt;https://answers.splunk.com/answers/108295/sending-two-inputs-from-one-universal-forwarder-to-two-different-indexers-not-load-balancing.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Let me know if this helps you!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 11:05:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293568#M55849</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-10T11:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure inputs.conf to send data from 1 directory to 2 different clusters with different index/sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293569#M55850</link>
      <description>&lt;P&gt;Hi tusharsaran1,&lt;BR /&gt;
you have two solutions to your problem:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;use symbolic link,&lt;/LI&gt;
&lt;LI&gt;override sourcetype.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;For symbolic link you have to use symlink and configure two stanzas in inputs.conf.&lt;/P&gt;

&lt;P&gt;To override sourcetype see &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Data/Advancedsourcetypeoverrides"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Data/Advancedsourcetypeoverrides&lt;/A&gt; .&lt;/P&gt;

&lt;P&gt;If possible I suggest the second one.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 11:15:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293569#M55850</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-01-10T11:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure inputs.conf to send data from 1 directory to 2 different clusters with different index/sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293570#M55851</link>
      <description>&lt;P&gt;Not exactly. I have edited my question's original description to provide more context.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 11:15:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293570#M55851</guid>
      <dc:creator>tusharsaran1</dc:creator>
      <dc:date>2018-01-10T11:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure inputs.conf to send data from 1 directory to 2 different clusters with different index/sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293571#M55852</link>
      <description>&lt;P&gt;i have edited the answer pls check&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 11:30:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293571#M55852</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-10T11:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure inputs.conf to send data from 1 directory to 2 different clusters with different index/sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293572#M55853</link>
      <description>&lt;P&gt;I am not sure if the second solution is going to work for us. The documentation that you shared talks about overriding sourcetypes on a per-event basis. We need to configure different sourcetypes on a directory basis. Moreover, we also need to assign different indexes.&lt;BR /&gt;
Can you provide some more info about symlinks here? How should we use symlinks to suit our requirements? Do you mean we should just create a symlink and then have 2 monitor stanzas (one for the original dir and one for the symlink) ? If yes, then I think this is a good idea.&lt;BR /&gt;
Also, why do you prefer the second approach?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 11:33:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293572#M55853</guid>
      <dc:creator>tusharsaran1</dc:creator>
      <dc:date>2018-01-10T11:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure inputs.conf to send data from 1 directory to 2 different clusters with different index/sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293573#M55854</link>
      <description>&lt;P&gt;Hi tusharsaran1,&lt;BR /&gt;
I prefer second approach because in this way I have more control on the operation managing it on the indexers.&lt;BR /&gt;
In this way you configure one of your clusters indexers to change sourcetype for a specified sourcetype:&lt;BR /&gt;
e.g. if I have a sourcetype called S_one and I want to change in S_two I use&lt;/P&gt;

&lt;P&gt;in props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[S_One]
TRANSFORMS-S_One = Override_S_One
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[Override_S_One]
REGEX = .
FORMAT = sourcetype::Override_S_One
DEST_KEY = MetaData:Sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;About symlink, yes you create a symlink and then you have two stanzas in inputs.conf.&lt;BR /&gt;
remember to put in your symlink stanza the following items:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;crcSalt = &amp;lt;SOURCE&amp;gt;
followSymlink = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:36:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293573#M55854</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-29T17:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure inputs.conf to send data from 1 directory to 2 different clusters with different index/sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293574#M55855</link>
      <description>&lt;P&gt;Thanks for your response Giuseppe. What we observed during our testing earlier was that fishbucket was preventing the files in the dir to be sent to both clusters because it respected only 1 stanza and ignored the file when it encountered the second stanza.&lt;BR /&gt;
When we use symlinks, won't we run into the same issue again as the actual file names (including absolute path) would still remain the same?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 13:35:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293574#M55855</guid>
      <dc:creator>tusharsaran1</dc:creator>
      <dc:date>2018-01-10T13:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure inputs.conf to send data from 1 directory to 2 different clusters with different index/sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293575#M55856</link>
      <description>&lt;P&gt;Hi tusharsaran1,&lt;BR /&gt;
did you used &lt;CODE&gt;crcSalt = &amp;lt;SOURCE&amp;gt;&lt;/CODE&gt; and &lt;CODE&gt;followSymlink = true&lt;/CODE&gt; in symlink stanza?&lt;BR /&gt;
I have some situations managed with symlink and they correctly run.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 13:40:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293575#M55856</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-01-10T13:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure inputs.conf to send data from 1 directory to 2 different clusters with different index/sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293576#M55857</link>
      <description>&lt;P&gt;I meant when we did the testing without symlinks, we ran into issues with fishbucket. I am accepting  this answer for now as I am going to create symlinks to test it out. I'll reopen the communication if the solution doesn't work for us.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 15:42:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-inputs-conf-to-send-data-from-1-directory-to-2/m-p/293576#M55857</guid>
      <dc:creator>tusharsaran1</dc:creator>
      <dc:date>2018-01-10T15:42:49Z</dc:date>
    </item>
  </channel>
</rss>

