<?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 to index based on host, etc. in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Routing-to-index-based-on-host-etc/m-p/80927#M97117</link>
    <description>&lt;P&gt;I'm glad that it works now&lt;/P&gt;</description>
    <pubDate>Tue, 09 Nov 2010 17:32:49 GMT</pubDate>
    <dc:creator>chris</dc:creator>
    <dc:date>2010-11-09T17:32:49Z</dc:date>
    <item>
      <title>Routing to index based on host, etc.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Routing-to-index-based-on-host-etc/m-p/80924#M97114</link>
      <description>&lt;P&gt;We have an indexer and two forwarders.  The forwarders are installed on other syslog servers to forward their syslogs to the indexer.  The indexer has 2 indexes - main and index1&lt;/P&gt;

&lt;P&gt;I have successfully configured Splunk via props/transforms to route syslog sent directly from a Juniper to the indexer to the "index1" index instead of the default "main" by using the following config on the indexer:&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog]
TRANSFORMS-syslog-NSM=syslog-NSM
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog-NSM]
DEST_KEY = _MetaData:Index
REGEX = NSM
FORMAT = index1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am now trying to route any syslog that includes "XUS" in the host name to index1 but no matter what I try I cannot get it to work.  I'm suspecting that there is relevance to the syslog being sent directly to the indexer vs syslog being forwarded to the indexer via splunk forwarder.  Is this true? &lt;/P&gt;

&lt;P&gt;This is my latest of many attempts to get this to work.  What am I missing?  I understand my regex may not be correct, but I've tried more 'open' regexs and I still can't route anything coming from the forwarder.  I can get other syslogs being sent directly to the indexer to route to index1, but nothing from the forwarder:&lt;/P&gt;

&lt;P&gt;props.conf (updated)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog]
TRANSFORMS-syslog-NSM=syslog-NSM
TRANSFORMS-syslog-vault=syslog-vault
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf (updated)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog-NSM]
DEST_KEY = _MetaData:Index
REGEX = NSM
FORMAT = index1

[syslog-vault]
SOURCE_KEY = _MetaData:Index  (have tried with/without this)
DEST_KEY = _MetaData:Index
REGEX = XUS
FORMAT = index1
WRITE_META = true  (have tried with/without this)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is there something I can do on the indexer to get this to work?..meaning...can I configure routing on the indexer for syslog received via Splunk forwarder?  Or do I need to perform the routing on the forwarder itself?  If so, how should I do it?&lt;/P&gt;

&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Sat, 30 Oct 2010 03:49:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Routing-to-index-based-on-host-etc/m-p/80924#M97114</guid>
      <dc:creator>mmletzko</dc:creator>
      <dc:date>2010-10-30T03:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: Routing to index based on host, etc.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Routing-to-index-based-on-host-etc/m-p/80925#M97115</link>
      <description>&lt;P&gt;Hi Mmletzko&lt;/P&gt;

&lt;P&gt;You are right there is a difference between the messages being sent directly to the indexer and forwarded messages. It depends on whether you are using the light forwarder or the regular forwarder aswell.&lt;/P&gt;

&lt;P&gt;There is good wiki page that helps a lot which is &lt;A href="http://www.splunk.com/wiki/Where_do_I_configure_my_Splunk_settings%3F" rel="nofollow"&gt;here (Where do I configure my Splunk settings)&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If I understand you correctly you have:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;a regular forwarder and an indexer&lt;/LI&gt;
&lt;LI&gt;a juniper device sends messages containing "NSM" directly to the indexer &lt;/LI&gt;
&lt;LI&gt;other devices that send "XUS" messages to the forwarder &lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;-&amp;gt; Both messages should end up in index1&lt;/P&gt;

&lt;P&gt;I think this is what you need:&lt;/P&gt;

&lt;P&gt;On the indexer&lt;BR /&gt;
&lt;CODE&gt;props.conf&lt;BR /&gt;
[syslog]&lt;BR /&gt;
TRANSFORMS-syslog-NSM=syslog-NSM&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;transforms.conf&lt;BR /&gt;
[syslog-NSM]&lt;BR /&gt;
DEST_KEY = _MetaData:Index&lt;BR /&gt;
REGEX = NSM&lt;BR /&gt;
FORMAT = index1&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;On the forwarder&lt;BR /&gt;
&lt;CODE&gt;props.conf&lt;BR /&gt;
[syslog]&lt;BR /&gt;
TRANSFORMS-syslog-vault=syslog-vault&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;transforms.conf&lt;BR /&gt;
[syslog-vault]&lt;BR /&gt;
DEST_KEY = _MetaData:Index&lt;BR /&gt;
REGEX = XUS&lt;BR /&gt;
FORMAT = index1&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;That is almost what you had, I hope this helps&lt;/P&gt;</description>
      <pubDate>Mon, 01 Nov 2010 00:23:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Routing-to-index-based-on-host-etc/m-p/80925#M97115</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2010-11-01T00:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Routing to index based on host, etc.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Routing-to-index-based-on-host-etc/m-p/80926#M97116</link>
      <description>&lt;P&gt;Chris - THANK YOU!!!&lt;/P&gt;

&lt;P&gt;Looks like I danced around this, but didn't quite have it.  I had the correct configuration in the transforms/props files, but I think the problem was that I had the routing configured on the forwarder (full forwarder, btw) AND the indexer at the same time.  The one thing I hadn't tried was having it configured ONLY on the forwarder and not the indexer.  Once I removed the settings from the indexer and then enabled them ONLY on the forwarder, it did the trick!!!&lt;/P&gt;

&lt;P&gt;So here are the final settings that did the trick:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;indexer - props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog]
TRANSFORMS-syslog-NSM=syslog-NSM
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;indexer - transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog-NSM]
DEST_KEY = _MetaData:Index
REGEX = NSM
FORMAT = index1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;forwarder - props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog]
TRANSFORMS-syslog-vault=syslog-vault
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;forwarder - transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog-vault]
DEST_KEY = _MetaData:Index
REGEX = XUS
FORMAT = index1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks again Chris - you restored my sanity!!&lt;/P&gt;

&lt;P&gt;-Matt&lt;/P&gt;</description>
      <pubDate>Mon, 01 Nov 2010 19:46:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Routing-to-index-based-on-host-etc/m-p/80926#M97116</guid>
      <dc:creator>mmletzko</dc:creator>
      <dc:date>2010-11-01T19:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Routing to index based on host, etc.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Routing-to-index-based-on-host-etc/m-p/80927#M97117</link>
      <description>&lt;P&gt;I'm glad that it works now&lt;/P&gt;</description>
      <pubDate>Tue, 09 Nov 2010 17:32:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Routing-to-index-based-on-host-etc/m-p/80927#M97117</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2010-11-09T17:32:49Z</dc:date>
    </item>
  </channel>
</rss>

