<?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: How to reroute index for props/transform in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-reroute-index-for-props-transform/m-p/461757#M79705</link>
    <description>&lt;P&gt;Thanks!  This definitely works.  Still would like to know what was wrong with what I originally had but at least this works!&lt;/P&gt;</description>
    <pubDate>Mon, 26 Aug 2019 18:07:09 GMT</pubDate>
    <dc:creator>dglass0215</dc:creator>
    <dc:date>2019-08-26T18:07:09Z</dc:date>
    <item>
      <title>How to reroute index for props/transform</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-reroute-index-for-props-transform/m-p/461755#M79703</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;

&lt;P&gt;I have my props/transforms setup so that it routes data to specific indexes (For the most part) based on hostname.  This was working great until I realized that it was also including data that was meant for internal indexes like _internal.  Specifically for splunkd sourcetype.  This was making my license utilize way more data than it should have been.  So I added a prop for [splunkd] sourcetype to route data to _internal.  This is now working for alot of my hosts but for some reason there are still 4 indexes receiving data that should be routed to _internal, they are indexes named mhh, irw, lvn, lee.  Any help is much appreciated.  Props and transforms below:&lt;/P&gt;

&lt;P&gt;PROPS:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[HawkeyeIOLS]
TRANSFORMS-set= setnull,setparsing
SEDCMD-DOB = s#DOB/\d{8}#DOB/[REDACTED]#g
SEDCMD-SEX = s#SEX/.#SEX/[REDACTED]#g
SEDCMD-RAC = s#RAC/.#RAC/[REDACTED]#g

[splunkd]
TRANSFORMS-set_index_internal = set_index_internal
priority=10

[host::(5050-LANE|5050-RGWS)]
TRANSFORMS-set_index_5050 = set_index_bel

[host::irw*]
TRANSFORMS-set_index_irw = set_index_irw

[host::mhh*]
TRANSFORMS-set_index_mhh = set_index_mhh

[host::mcn*]
TRANSFORMS-set_index_mcn = set_index_mcn

[host::lee*]
TRANSFORMS-set_index_lee = set_index_lee

[host::lvn*]
TRANSFORMS-set_index_lvn = set_index_lvn

[host::riv*]
TRANSFORMS-set_index_riv = set_index_riv

[host::con*]
TRANSFORMS-set_index_con = set_index_con

[host::ann*]
TRANSFORMS-set_index_ann = set_index_ann

[host::bel*]
TRANSFORMS-set_index_bel = set_index_bel

[host::apg*]
TRANSFORMS-set_index_apg = set_index_apg

[host::hol*]
TRANSFORMS-set_index_hol = set_index_hol
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;TRANSFORMS:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[setparsing]
REGEX = \b(?:offline|online|HTTP 502 Bad Gateway|CheckUpdate: Error)\b
DEST_KEY = queue
FORMAT = indexQueue

[set_index_internal]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = _internal

[set_index_con]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = motco

[set_index_ann]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = ANN

[set_index_bel]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = BEL

[set_index_apg]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = APG

[set_index_hol]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = HOL

[set_index_irw]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = IRW

[set_index_mhh]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = mhh

[set_index_mcn]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = mcn

[set_index_lee]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = lee

[set_index_lvn]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = lvn

[set_index_riv]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = riv
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Aug 2019 15:00:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-reroute-index-for-props-transform/m-p/461755#M79703</guid>
      <dc:creator>dglass0215</dc:creator>
      <dc:date>2019-08-26T15:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to reroute index for props/transform</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-reroute-index-for-props-transform/m-p/461756#M79704</link>
      <description>&lt;P&gt;Hi @dglass0215,&lt;/P&gt;

&lt;P&gt;You can improve your config as follows to avoid any "conditions" causing data to escape and go in the wrong index. &lt;/P&gt;

&lt;P&gt;To do so, instead of capturing the sourcetype splunkd as you did from one side and the hosts from the other, you can do both in the same stanza. Below an example for a single host :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[host::lee*]
TRANSFORMS-set_index_lee = set_index_lee, set_index_internal

[set_index_lee]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = lee

[set_index_internal]
SOURCE_KEY = MetaData:Sourcetype
DEST_KEY = _MetaData:Index
REGEX =  splunkd
FORMAT = _internal
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The transforms need to go in the order shown above (&lt;CODE&gt;set_index_lee, set_index_internal&lt;/CODE&gt;) to be sure the indexes get changed as needed.&lt;/P&gt;

&lt;P&gt;Once the above is done for all your hosts you can get rid of the config below from &lt;CODE&gt;props.conf&lt;/CODE&gt; :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[splunkd]
TRANSFORMS-set_index_internal = set_index_internal
priority=10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know how that works for you.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 16:29:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-reroute-index-for-props-transform/m-p/461756#M79704</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-08-26T16:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to reroute index for props/transform</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-reroute-index-for-props-transform/m-p/461757#M79705</link>
      <description>&lt;P&gt;Thanks!  This definitely works.  Still would like to know what was wrong with what I originally had but at least this works!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 18:07:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-reroute-index-for-props-transform/m-p/461757#M79705</guid>
      <dc:creator>dglass0215</dc:creator>
      <dc:date>2019-08-26T18:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to reroute index for props/transform</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-reroute-index-for-props-transform/m-p/461758#M79706</link>
      <description>&lt;P&gt;You're welcome !&lt;/P&gt;

&lt;P&gt;And yeah I would like to know the problem too... you could test it out by simplifying the set up as much as possible. Maybe remove all the stanzas keeping only one of the ones causing the issue and the splunkd one, then see if thats still not working..&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 19:08:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-reroute-index-for-props-transform/m-p/461758#M79706</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-08-26T19:08:22Z</dc:date>
    </item>
  </channel>
</rss>

