<?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 route to an Index based on SourceType AND Host combination in inputs.conf? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-route-to-an-Index-based-on-SourceType-AND-Host/m-p/255269#M49032</link>
    <description>&lt;P&gt;I am pretty sure there are plenty of people that have accomplished deploying common UF apps without separating indexes by server. In fact, a large deployment built this way will likely encounter some problems or at least become difficult to manage given the potential number of indexes.&lt;/P&gt;

&lt;P&gt;My question would be why do you want to separate indexes by server? Is there some requirement that demands this?&lt;/P&gt;</description>
    <pubDate>Mon, 05 Dec 2016 13:23:19 GMT</pubDate>
    <dc:creator>rjthibod</dc:creator>
    <dc:date>2016-12-05T13:23:19Z</dc:date>
    <item>
      <title>How to route to an Index based on SourceType AND Host combination in inputs.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-route-to-an-Index-based-on-SourceType-AND-Host/m-p/255268#M49031</link>
      <description>&lt;P&gt;I have a setup as Universal Forwarder (UF) - Heavy Forwarder (HF) - Indexer - Search Head (SH). &lt;BR /&gt;
Where multiple UF are sending data to single HF which in turn sends data to single Indexer. &lt;/P&gt;

&lt;P&gt;I have below stanza on my multiple UF's inputs.conf file&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[perfmon://CPU Load]
counters = % Processor Time;% User Time
object = Processor
instances = _Total
interval = 30
sourcetype = Perfmon
index = idx_XXX_Perfmon_CPU-Load
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Where XXX is server name. Now, in order to have a common app across all UF to be deployed through Deployment server, I have removed the Index from the stanza and wants to assign index based on Host + SourceType combination on a HF using props.conf and transform.conf.&lt;/P&gt;

&lt;P&gt;Example: &lt;BR /&gt;
- If event comes from Server1 with sourcetype as Perfmon then set index = idx_Server1_Perfmon_CPU-Load &lt;BR /&gt;
- If event comes from Server2 with sourcetype as Perfmon then set index = idx_Server2_Perfmon_CPU-Load.&lt;/P&gt;

&lt;P&gt;Please help me to design correct stanza for this requirement.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:58:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-route-to-an-Index-based-on-SourceType-AND-Host/m-p/255268#M49031</guid>
      <dc:creator>shan_santosh</dc:creator>
      <dc:date>2020-09-29T11:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to route to an Index based on SourceType AND Host combination in inputs.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-route-to-an-Index-based-on-SourceType-AND-Host/m-p/255269#M49032</link>
      <description>&lt;P&gt;I am pretty sure there are plenty of people that have accomplished deploying common UF apps without separating indexes by server. In fact, a large deployment built this way will likely encounter some problems or at least become difficult to manage given the potential number of indexes.&lt;/P&gt;

&lt;P&gt;My question would be why do you want to separate indexes by server? Is there some requirement that demands this?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2016 13:23:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-route-to-an-Index-based-on-SourceType-AND-Host/m-p/255269#M49032</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2016-12-05T13:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to route to an Index based on SourceType AND Host combination in inputs.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-route-to-an-Index-based-on-SourceType-AND-Host/m-p/255270#M49033</link>
      <description>&lt;P&gt;The primary reason for having separate index by server is to get rid of unwanted data easily once the server from lab environment is decommissioned. If I have a common index across host, how easy is to delete unwanted events from index. &lt;BR /&gt;
Having a separate index per server is not recommended?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2016 19:00:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-route-to-an-Index-based-on-SourceType-AND-Host/m-p/255270#M49033</guid>
      <dc:creator>shan_santosh</dc:creator>
      <dc:date>2016-12-05T19:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to route to an Index based on SourceType AND Host combination in inputs.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-route-to-an-Index-based-on-SourceType-AND-Host/m-p/255271#M49034</link>
      <description>&lt;P&gt;Having an index per server is not recommended, that would be far too many indexes.&lt;BR /&gt;
To handle the above situation why don't you use the deployment server to publish multiple applications with different index configurations for different servers?&lt;/P&gt;

&lt;P&gt;in my scenario I'm publishing the main configuration in 1 app and additional more specific configuration in another application.&lt;BR /&gt;
For example I publish a generic Windows TA application, then a publish an additional application with the performance monitoring enabled for the servers that require it...&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2016 23:51:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-route-to-an-Index-based-on-SourceType-AND-Host/m-p/255271#M49034</guid>
      <dc:creator>gjanders</dc:creator>
      <dc:date>2016-12-05T23:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to route to an Index based on SourceType AND Host combination in inputs.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-route-to-an-Index-based-on-SourceType-AND-Host/m-p/255272#M49035</link>
      <description>&lt;P&gt;Splunk can route events to a specific index based on the server name.  Below is a snippet of props.conf as well as the transforms.conf stanza that will perform the index routing that you described.  Check &lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.1/Admin/Transformsconf" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/6.5.1/Admin/Transformsconf&lt;/A&gt; for details on the attributes used in the transform.conf stanza. &lt;/P&gt;

&lt;H2&gt;Props.conf (snippet) &lt;/H2&gt;

&lt;P&gt;description = Index is overwritten by the transforms &lt;BR /&gt;
TRANSFORMS-setindex=setindexbyhost &lt;/P&gt;

&lt;H2&gt;Transforms.conf &lt;/H2&gt;

&lt;P&gt;[setindexbyhost] &lt;BR /&gt;
SOURCE_KEY = MetaData:Host &lt;BR /&gt;
REGEX = ^host::(.*)$ &lt;BR /&gt;
DEST_KEY = &lt;EM&gt;MetaData:Index &lt;BR /&gt;
FORMAT = idx&lt;/EM&gt;_$1_perfmon_cpu-load &lt;/P&gt;

&lt;P&gt;However, having a separate index for each source server is not recommended.  This could lead to both management and performance challenges in a large Splunk installation.  There are definitely cases where one may want to split out events for a group of source servers due to thing such as access and/or retention requirements.  For example, send all development server events to a development index and all production server events to production index. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:18:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-route-to-an-Index-based-on-SourceType-AND-Host/m-p/255272#M49035</guid>
      <dc:creator>tpeveler_splunk</dc:creator>
      <dc:date>2020-09-29T12:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to route to an Index based on SourceType AND Host combination in inputs.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-route-to-an-Index-based-on-SourceType-AND-Host/m-p/595402#M103993</link>
      <description>&lt;P&gt;This is old article, but I still add one comment how I'm doing it if possible (little bit modified version from &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/106850"&gt;@gjanders&lt;/a&gt;&amp;nbsp;' own method).&lt;/P&gt;&lt;P&gt;I have plain app from splunkbase without any inputs. Then separate apps like 0xy_&amp;lt;splunkbase_app&amp;gt; for all needed separate configurations and join these into serverclasses.&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 12:36:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-route-to-an-Index-based-on-SourceType-AND-Host/m-p/595402#M103993</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2022-04-26T12:36:20Z</dc:date>
    </item>
  </channel>
</rss>

