<?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 forward events to multiple indexers in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/forward-events-to-multiple-indexers/m-p/422079#M94185</link>
    <description>&lt;P&gt;hi everyone,&lt;/P&gt;

&lt;P&gt;I have web server events.&lt;BR /&gt;
I want to forward  specific events that contain digits 404 to index1 and remaining event to index2.&lt;BR /&gt;
below is an example event: &lt;BR /&gt;
12.130.60.4 - - [13/Jan/2016 21:03:09:149] "GET /category.screen?category_id=GIFTS&amp;amp;JSESSIONID=SD9SL6FF8ADFF9 HTTP 1.1" &lt;STRONG&gt;404&lt;/STRONG&gt; 3585 "&lt;A href="http://www.myflowershop.com/category.screen?category_id=GIFTS" target="_blank"&gt;http://www.myflowershop.com/category.screen?category_id=GIFTS&lt;/A&gt;" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.38 Safari/533.4" 976&lt;/P&gt;

&lt;P&gt;Please advise.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 21:00:01 GMT</pubDate>
    <dc:creator>riqbal</dc:creator>
    <dc:date>2020-09-29T21:00:01Z</dc:date>
    <item>
      <title>forward events to multiple indexers</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/forward-events-to-multiple-indexers/m-p/422079#M94185</link>
      <description>&lt;P&gt;hi everyone,&lt;/P&gt;

&lt;P&gt;I have web server events.&lt;BR /&gt;
I want to forward  specific events that contain digits 404 to index1 and remaining event to index2.&lt;BR /&gt;
below is an example event: &lt;BR /&gt;
12.130.60.4 - - [13/Jan/2016 21:03:09:149] "GET /category.screen?category_id=GIFTS&amp;amp;JSESSIONID=SD9SL6FF8ADFF9 HTTP 1.1" &lt;STRONG&gt;404&lt;/STRONG&gt; 3585 "&lt;A href="http://www.myflowershop.com/category.screen?category_id=GIFTS" target="_blank"&gt;http://www.myflowershop.com/category.screen?category_id=GIFTS&lt;/A&gt;" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.38 Safari/533.4" 976&lt;/P&gt;

&lt;P&gt;Please advise.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:00:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/forward-events-to-multiple-indexers/m-p/422079#M94185</guid>
      <dc:creator>riqbal</dc:creator>
      <dc:date>2020-09-29T21:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: forward events to multiple indexers</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/forward-events-to-multiple-indexers/m-p/422080#M94186</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;P&gt;In props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mysourcetype]
TRANSFORMS-setIndex = setindex1, setindex2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setindex1]
DEST_KEY = _MetaData:Index
REGEX = 404
FORMAT = index1

[setindex2]
DEST_KEY = _MetaData:Index
REGEX = .
FORMAT = index2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 26 Aug 2018 12:58:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/forward-events-to-multiple-indexers/m-p/422080#M94186</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-08-26T12:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: forward events to multiple indexers</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/forward-events-to-multiple-indexers/m-p/422081#M94187</link>
      <description>&lt;P&gt;hi&lt;BR /&gt;
thanks for your kind support. yesterday  I achieved that. below is my working config.&lt;/P&gt;

&lt;P&gt;inputs.conf&lt;BR /&gt;
[monitor:///splunkfiles/lxxx/access_combined.log]&lt;BR /&gt;
sourcetype = access_combined&lt;BR /&gt;
&lt;STRONG&gt;index = webindex&lt;/STRONG&gt;  &lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
[access_combined]&lt;BR /&gt;
TRANSFORMS-local = notfound&lt;/P&gt;

&lt;P&gt;Transforms.conf&lt;/P&gt;

&lt;P&gt;[notfound]&lt;BR /&gt;
&lt;STRONG&gt;REGEX = "\s(404)\s&lt;/STRONG&gt;&lt;BR /&gt;
DEST_KEY = _MetaData:Index&lt;BR /&gt;
FORMAT = notfoundindex&lt;/P&gt;

&lt;P&gt;Initially, I used your approach. but it did not work with me.&lt;/P&gt;

&lt;P&gt;can you please explain line 8 in transforms.conf.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;lastly, we task is to move the events to corresponding indexes before getting indexed(save license). Is this method correct?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:03:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/forward-events-to-multiple-indexers/m-p/422081#M94187</guid>
      <dc:creator>riqbal</dc:creator>
      <dc:date>2020-09-29T21:03:44Z</dc:date>
    </item>
  </channel>
</rss>

