<?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 Routing Data to specific index based on filename in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Routing-Data-to-specific-index-based-on-filename/m-p/143655#M29328</link>
    <description>&lt;P&gt;We need to route data to specific indexes based on the file names being monitored.  We are trying to get the data from the file(s) /app_qa/vodn_01/logfiles/current/bipc9996.stdout to route to the index named "RATABASE_SIT2" With our current settings all of this data is going to index "main"  We have several other files that need to be routed accordingly, we are just looking for a good example we can use.&lt;/P&gt;

&lt;P&gt;inputs.conf:&lt;BR /&gt;
[monitor:///app_qa/vodn_01/logfiles/current/&lt;EM&gt;.&lt;/EM&gt;]&lt;BR /&gt;
followSymlink=true&lt;BR /&gt;
crcSalt = &lt;SOURCE&gt;&lt;/SOURCE&gt;&lt;/P&gt;

&lt;P&gt;props:&lt;BR /&gt;
[source::bipc9996.stdout]&lt;BR /&gt;
TRANSFORMS-routing_SIT2_bipc9996 = index_redirect_to_RATABASE_SIT2_bipc9996&lt;/P&gt;

&lt;P&gt;transforms:&lt;BR /&gt;
[index_redirect_to_RATABASE_SIT2_bipc9996]&lt;BR /&gt;
REGEX = bipc9996.stdout&lt;BR /&gt;
sourcetype = bipc9996_SIT2&lt;BR /&gt;
DEST_KEY = _MetaData:Index&lt;BR /&gt;
FORMAT = RATABASE_SIT2&lt;/P&gt;

&lt;P&gt;we assume these files (props/transforms) should be in the etc/app/local folder on the deployment server/forwarder.  We have also deployed these changes to the indexer. Is this setup incorrect?&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 17:04:33 GMT</pubDate>
    <dc:creator>mookiie2005</dc:creator>
    <dc:date>2020-09-28T17:04:33Z</dc:date>
    <item>
      <title>Routing Data to specific index based on filename</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Routing-Data-to-specific-index-based-on-filename/m-p/143655#M29328</link>
      <description>&lt;P&gt;We need to route data to specific indexes based on the file names being monitored.  We are trying to get the data from the file(s) /app_qa/vodn_01/logfiles/current/bipc9996.stdout to route to the index named "RATABASE_SIT2" With our current settings all of this data is going to index "main"  We have several other files that need to be routed accordingly, we are just looking for a good example we can use.&lt;/P&gt;

&lt;P&gt;inputs.conf:&lt;BR /&gt;
[monitor:///app_qa/vodn_01/logfiles/current/&lt;EM&gt;.&lt;/EM&gt;]&lt;BR /&gt;
followSymlink=true&lt;BR /&gt;
crcSalt = &lt;SOURCE&gt;&lt;/SOURCE&gt;&lt;/P&gt;

&lt;P&gt;props:&lt;BR /&gt;
[source::bipc9996.stdout]&lt;BR /&gt;
TRANSFORMS-routing_SIT2_bipc9996 = index_redirect_to_RATABASE_SIT2_bipc9996&lt;/P&gt;

&lt;P&gt;transforms:&lt;BR /&gt;
[index_redirect_to_RATABASE_SIT2_bipc9996]&lt;BR /&gt;
REGEX = bipc9996.stdout&lt;BR /&gt;
sourcetype = bipc9996_SIT2&lt;BR /&gt;
DEST_KEY = _MetaData:Index&lt;BR /&gt;
FORMAT = RATABASE_SIT2&lt;/P&gt;

&lt;P&gt;we assume these files (props/transforms) should be in the etc/app/local folder on the deployment server/forwarder.  We have also deployed these changes to the indexer. Is this setup incorrect?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:04:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Routing-Data-to-specific-index-based-on-filename/m-p/143655#M29328</guid>
      <dc:creator>mookiie2005</dc:creator>
      <dc:date>2020-09-28T17:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Routing Data to specific index based on filename</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Routing-Data-to-specific-index-based-on-filename/m-p/143656#M29329</link>
      <description>&lt;P&gt;Easiest thing would be to set the correct index directly in inputs.conf on the forwarder.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///app_qa/vodn_01/logfiles/current/bipc9996.stdout]
index = RATABASE_SIT2
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Otherwise if you don't want that for some reason, this can be done almost like what you've pasted but NOT on the forwarders - it needs to go on the full Splunk instance that performs parsing of the logs, which is often your indexers.&lt;/P&gt;

&lt;P&gt;props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/app_qa/vodn_01/logfiles/current/bipc9996.stdout]
TRANSFORMS-routing_SIT2_bipc9996 = index_redirect_to_RATABASE_SIT2_bipc9996
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[index_redirect_to_RATABASE_SIT2_bipc9996]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = RATABASE_SIT2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As you can see I'm simply using "." as regex - this is because the source matching was already performed in props.conf, so no further matching should be needed.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2014 17:15:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Routing-Data-to-specific-index-based-on-filename/m-p/143656#M29329</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2014-07-15T17:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Routing Data to specific index based on filename</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Routing-Data-to-specific-index-based-on-filename/m-p/143657#M29330</link>
      <description>&lt;P&gt;are you using heavy forwarder or light forwarder?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2014 17:22:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Routing-Data-to-specific-index-based-on-filename/m-p/143657#M29330</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-07-15T17:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: Routing Data to specific index based on filename</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Routing-Data-to-specific-index-based-on-filename/m-p/143658#M29331</link>
      <description>&lt;P&gt;I assume the issue is with source. The source that you have set in props.conf might not be right&lt;/P&gt;

&lt;P&gt;You need to set sourcetype in your inputs.conf file. Something like  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///app_qa/vodn_01/logfiles/current/bipc999*]  
followSymlink=true  
crcSalt = &amp;lt;source&amp;gt;  
sourcetype = bipc999
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf can contain  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[bipc999]  
TRANSFORMS-routing_SIT2_bipc9996 = index_redirect_to_RATABASE_SIT2_bipc9996
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It depends on what kind of forwarder you are using. If you use light forwarder then props and transforms should be on indexer.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2014 17:24:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Routing-Data-to-specific-index-based-on-filename/m-p/143658#M29331</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-07-15T17:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Routing Data to specific index based on filename</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Routing-Data-to-specific-index-based-on-filename/m-p/143659#M29332</link>
      <description>&lt;P&gt;Splunk doesn't recommend overriding source, hence i work with sourcetypes mostly &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.2/admin/Inputsconf"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.2/admin/Inputsconf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2014 17:25:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Routing-Data-to-specific-index-based-on-filename/m-p/143659#M29332</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-07-15T17:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Routing Data to specific index based on filename</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Routing-Data-to-specific-index-based-on-filename/m-p/143660#M29333</link>
      <description>&lt;P&gt;The path did not quite work for me, I ended up have to use this:&lt;/P&gt;

&lt;P&gt;[source::/app_qa/vodn_01/logfiles/.../bipc9996.stdout]&lt;BR /&gt;
I found that the current directory was a symbolic link and this was the only way to get it to index the log.  If I used the below it would not work correctly:&lt;BR /&gt;
[source::/app_qa/vodn_01/logfiles/*/bipc9996.stdout]&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:07:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Routing-Data-to-specific-index-based-on-filename/m-p/143660#M29333</guid>
      <dc:creator>mookiie2005</dc:creator>
      <dc:date>2020-09-28T17:07:13Z</dc:date>
    </item>
  </channel>
</rss>

