<?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: Filtering data into different indexes in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75224#M15340</link>
    <description>&lt;P&gt;For organizational purposes, I would place them in a custom app or $splunk_home/etc/apps/search/local&lt;/P&gt;</description>
    <pubDate>Tue, 21 Feb 2012 19:18:11 GMT</pubDate>
    <dc:creator>bwooden</dc:creator>
    <dc:date>2012-02-21T19:18:11Z</dc:date>
    <item>
      <title>Filtering data into different indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75217#M15333</link>
      <description>&lt;P&gt;I would like to send some events from a source to one index, and the rest to another.  Can someone point me to a link that will help me accomplish this?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2012 19:16:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75217#M15333</guid>
      <dc:creator>timmy13</dc:creator>
      <dc:date>2012-02-20T19:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering data into different indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75218#M15334</link>
      <description>&lt;P&gt;It is best practice to specify index during input phase (inputs.conf)&lt;/P&gt;

&lt;P&gt;If only one source needs to be routed to a specific index, it would be best to do this at input time...&lt;BR /&gt;
E.g. inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log]
index=main
sourcetype=syslog

[monitor://.../my_secure_app/secure.log]
index=secure
sourcetype=secure_log
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If &lt;CODE&gt;my_secure_app&lt;/CODE&gt; has many logs but only one needs to go to a different index, we may still do this at inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://.../my_secure_app/*]
blacklist=secure.log$
index=main
sourcetype=log4j 

[monitor://.../my_secure_app/secure.log]
index=secure
sourcetype=secure_log
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Failing that, if there are too many stanzas required, we can route later, downstream, based on sourcetype, host, and source, per:  &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Deploy/Routeandfilterdatad"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Deploy/Routeandfilterdatad&lt;/A&gt;.  This is not as efficient and generally not as easy to 'see what is happening' but may be used when configuration at input level is not practical.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2012 19:21:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75218#M15334</guid>
      <dc:creator>bwooden</dc:creator>
      <dc:date>2012-02-20T19:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering data into different indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75219#M15335</link>
      <description>&lt;P&gt;You would perform routing via props wherever parsing occurs (generally heavy forwarders or indexers).  Universal forwarders do not parse but indexes and sourcetypes may still be set at input time, which is more efficient.  For more information on 'where in Splunk' to configure something, check out this Wiki article:  &lt;A href="http://wiki.splunk.com/Where_do_I_configure_my_Splunk_settings%3F"&gt;http://wiki.splunk.com/Where_do_I_configure_my_Splunk_settings%3F&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2012 19:35:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75219#M15335</guid>
      <dc:creator>bwooden</dc:creator>
      <dc:date>2012-02-20T19:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering data into different indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75220#M15336</link>
      <description>&lt;P&gt;So in the above example, the source type would determine which index the events were written.  log4j would go in main, and secure_log would go in to secure?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2012 22:45:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75220#M15336</guid>
      <dc:creator>timmy13</dc:creator>
      <dc:date>2012-02-20T22:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering data into different indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75221#M15337</link>
      <description>&lt;P&gt;More specifically, as an example. Lets say I wanted to filter all the log_level=ERROR events from the splunkd.log to go into the splunk_errors index, and everything else to go to the splunk_ok index. CAn you show me syntax for this example?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:25:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75221#M15337</guid>
      <dc:creator>timmy13</dc:creator>
      <dc:date>2020-09-28T11:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering data into different indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75222#M15338</link>
      <description>&lt;P&gt;props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::...splunkd.log]
TRANSFORMS-indexRouting = route_all_to_ok_index, route_errors_to_errors_index
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[route_all_to_ok_index]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = splunk_ok

[route_errors_to_errors_index]
REGEX = log_level=ERROR
DEST_KEY = _MetaData:Index
FORMAT = splunk_errors
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In this case, you could actually eliminate need for 'route_all_to_ok_index' by sending that source to splunk_ok index at inputs level and override just for log_level=ERROR&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:25:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75222#M15338</guid>
      <dc:creator>bwooden</dc:creator>
      <dc:date>2020-09-28T11:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering data into different indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75223#M15339</link>
      <description>&lt;P&gt;Ok, that makes perfect sense.  Now a stupid question.  The splunkd.log data input is defined in the gui and resides in the filesystem in $splunk_home/etc/apps/learned/local.  Is this where I should place the props.conf and transforms.conf?  Is this best practice?  THanks for all the help.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2012 18:21:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75223#M15339</guid>
      <dc:creator>timmy13</dc:creator>
      <dc:date>2012-02-21T18:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering data into different indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75224#M15340</link>
      <description>&lt;P&gt;For organizational purposes, I would place them in a custom app or $splunk_home/etc/apps/search/local&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2012 19:18:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75224#M15340</guid>
      <dc:creator>bwooden</dc:creator>
      <dc:date>2012-02-21T19:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering data into different indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75225#M15341</link>
      <description>&lt;P&gt;As recommended, I made the changes in $splunk_home/etc/apps/search/local&lt;/P&gt;

&lt;P&gt;However,I still see no data going to the splunk_errors index.&lt;/P&gt;

&lt;P&gt;Any tips on troubleshooting this issue?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2012 20:32:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75225#M15341</guid>
      <dc:creator>timmy13</dc:creator>
      <dc:date>2012-02-21T20:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering data into different indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75226#M15342</link>
      <description>&lt;P&gt;You've re-started?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2012 20:42:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75226#M15342</guid>
      <dc:creator>bwooden</dc:creator>
      <dc:date>2012-02-21T20:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering data into different indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75227#M15343</link>
      <description>&lt;P&gt;Did you set this up on a forwarder or the indexers?  This particular configuration belongs at the parsing stage (usually the indexers)&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2012 23:36:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75227#M15343</guid>
      <dc:creator>bwooden</dc:creator>
      <dc:date>2012-02-21T23:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering data into different indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75228#M15344</link>
      <description>&lt;P&gt;Yes, on the indexers, and I have restarted.  Still nothing in splunk_errors.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2012 15:46:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75228#M15344</guid>
      <dc:creator>timmy13</dc:creator>
      <dc:date>2012-02-22T15:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering data into different indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75229#M15345</link>
      <description>&lt;P&gt;Is this a literal exercise or a hypothetical example?  There are not key value pairs in splunkd.log so the "REGEX = log_level=ERROR" would actually be something like "REGEX = ^(?:\d{2}-\d{2}-\d{4})\s(?:\d{2}:\d{2}:\d{2}.\d{3})\s(?:\S+)\s(?:ERROR)" &lt;/P&gt;

&lt;P&gt;...but it would likely be better to create a saved search to report on errors (vs. stashing them in a separate index) depending on your use case.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2012 16:24:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75229#M15345</guid>
      <dc:creator>bwooden</dc:creator>
      <dc:date>2012-02-22T16:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering data into different indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75230#M15346</link>
      <description>&lt;P&gt;The literal case is that we are trying to allow those with "a need to know" access to all data, and everyone else just some of the more secure data.&lt;/P&gt;

&lt;P&gt;I was going to accomplish this by sending the secure data to another index, and limiting access to that index based on role.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2012 21:47:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-data-into-different-indexes/m-p/75230#M15346</guid>
      <dc:creator>timmy13</dc:creator>
      <dc:date>2012-02-22T21:47:05Z</dc:date>
    </item>
  </channel>
</rss>

