<?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 Re: routing remote syslog data to different indexes in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/routing-remote-syslog-data-to-different-indexes/m-p/103910#M21864</link>
    <description>&lt;P&gt;Here is the exact answer you need :&lt;/P&gt;

&lt;P&gt;&lt;A href="http://splunk-base.splunk.com/answers/8531/routing-to-index-based-on-host-etc" target="_blank"&gt;http://splunk-base.splunk.com/answers/8531/routing-to-index-based-on-host-etc&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;This is called : &lt;STRONG&gt;Index time field transformation&lt;/STRONG&gt;.&lt;BR /&gt;
You want to setup this props/transforms rules on the indexer (AND heavy forwarder in your case)&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;The props.conf will contain the sourcetype and the transforms to call&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
[syslog]&lt;BR /&gt;
TRANSFORMS-changeindex=routemyhosttomynewindex&lt;BR /&gt;
&lt;/PRE&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;the transforms.conf will use a regex to match the host and change the index accordingly.&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
[routemyhosttomynewindex]&lt;BR /&gt;
SOURCE_KEY = MetaData:Host&lt;BR /&gt;
REGEX = myhost&lt;BR /&gt;
DEST_KEY = MetaData:Index&lt;BR /&gt;
FORMAT = mynewindex&lt;BR /&gt;
&lt;/PRE&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Mon, 28 Sep 2020 12:07:26 GMT</pubDate>
    <dc:creator>yannK</dc:creator>
    <dc:date>2020-09-28T12:07:26Z</dc:date>
    <item>
      <title>routing remote syslog data to different indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/routing-remote-syslog-data-to-different-indexes/m-p/103909#M21863</link>
      <description>&lt;P&gt;We have a number of machines set up with rsyslog to collect data from various systems. Rsyslog all the data is sent to /var/log/remote/ in to individual log files for the sending host. I've got each of these machines also set up as heavy forwarders so we can do whatever we need to with the incoming data before we send it along to the indexers.&lt;/P&gt;

&lt;P&gt;Here's the inputs.conf file that I'm using at the moment:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log/remote]
disabled = 0
index = syslog
sourcetype = syslog
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I want to do eventually is change the index that the data is going to based on the host that is sending the initial syslog stream. What I'm looking for is some guidance on going about doing this. Is there a right way and a wrong way?&lt;/P&gt;

&lt;P&gt;Thoughts, comments, questions?&lt;/P&gt;

&lt;P&gt;colin j.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2012 19:27:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/routing-remote-syslog-data-to-different-indexes/m-p/103909#M21863</guid>
      <dc:creator>colinj</dc:creator>
      <dc:date>2012-07-19T19:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: routing remote syslog data to different indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/routing-remote-syslog-data-to-different-indexes/m-p/103910#M21864</link>
      <description>&lt;P&gt;Here is the exact answer you need :&lt;/P&gt;

&lt;P&gt;&lt;A href="http://splunk-base.splunk.com/answers/8531/routing-to-index-based-on-host-etc" target="_blank"&gt;http://splunk-base.splunk.com/answers/8531/routing-to-index-based-on-host-etc&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;This is called : &lt;STRONG&gt;Index time field transformation&lt;/STRONG&gt;.&lt;BR /&gt;
You want to setup this props/transforms rules on the indexer (AND heavy forwarder in your case)&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;The props.conf will contain the sourcetype and the transforms to call&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
[syslog]&lt;BR /&gt;
TRANSFORMS-changeindex=routemyhosttomynewindex&lt;BR /&gt;
&lt;/PRE&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;the transforms.conf will use a regex to match the host and change the index accordingly.&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
[routemyhosttomynewindex]&lt;BR /&gt;
SOURCE_KEY = MetaData:Host&lt;BR /&gt;
REGEX = myhost&lt;BR /&gt;
DEST_KEY = MetaData:Index&lt;BR /&gt;
FORMAT = mynewindex&lt;BR /&gt;
&lt;/PRE&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:07:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/routing-remote-syslog-data-to-different-indexes/m-p/103910#M21864</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2020-09-28T12:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: routing remote syslog data to different indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/routing-remote-syslog-data-to-different-indexes/m-p/103911#M21865</link>
      <description>&lt;P&gt;Hi Yann,&lt;/P&gt;

&lt;P&gt;Shouldnt that be "_MetaData:Index" instead of "MetaData:Index" ? &lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2015 11:08:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/routing-remote-syslog-data-to-different-indexes/m-p/103911#M21865</guid>
      <dc:creator>mikeschneider</dc:creator>
      <dc:date>2015-03-12T11:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: routing remote syslog data to different indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/routing-remote-syslog-data-to-different-indexes/m-p/103912#M21866</link>
      <description>&lt;P&gt;I am trying to use the props and transforms as provided in the answer here. In my case, the server, where the HFWD, is contains logs from several sources.&lt;BR /&gt;
Will this work ? ( the following files will be on the HFWD )&lt;/P&gt;

&lt;P&gt;inputs.conf&lt;BR /&gt;&lt;BR /&gt;
    [monitor:///var/log/*]&lt;BR /&gt;
    sourcetype = syslog&lt;BR /&gt;
    host_segment = 3&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
    [syslog]&lt;BR /&gt;
    TRANSFORMS-changeindex=routemyhosttomynewindex&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;BR /&gt;
    [routemyhosttomynewindex]&lt;BR /&gt;
    SOURCE_KEY = MetaData:Host&lt;BR /&gt;
    REGEX = myhost&lt;BR /&gt;
    DEST_KEY = MetaData:Index&lt;BR /&gt;
    FORMAT = mynewindex&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:02:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/routing-remote-syslog-data-to-different-indexes/m-p/103912#M21866</guid>
      <dc:creator>rajanala</dc:creator>
      <dc:date>2020-09-29T09:02:08Z</dc:date>
    </item>
  </channel>
</rss>

