<?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 use custom index for Universal Forwarder in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-custom-index-for-Universal-Forwarder/m-p/65513#M13157</link>
    <description>&lt;P&gt;There was a very similar question posted a couple of hours ago that has an excellent answer:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/questions/12923/indexes-and-universal-forwarder" rel="nofollow"&gt;http://answers.splunk.com/questions/12923/indexes-and-universal-forwarder&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Mar 2011 04:33:09 GMT</pubDate>
    <dc:creator>Ayn</dc:creator>
    <dc:date>2011-03-23T04:33:09Z</dc:date>
    <item>
      <title>How to use custom index for Universal Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-custom-index-for-Universal-Forwarder/m-p/65512#M13156</link>
      <description>&lt;P&gt;Both of my servers are Linux OS and I am using latest Splunk 4.2.&lt;/P&gt;

&lt;P&gt;I can forward from UF to Splunk to index, but everything - all monitor stanzas - is going to main index.&lt;/P&gt;

&lt;P&gt;I am trying to configure UF so /var/log/case1 monitor indexed under test_case1 index, already created on Splunk server and  /var/log/case2 monitor indexed under test_case2 index, also already created on Splunk server&lt;/P&gt;

&lt;P&gt;But when I try to execute following commands on splunkforwarder I get error&lt;/P&gt;

&lt;P&gt;splunk add monitor /var/log/case1 -index test_case1
splunk add monitor /var/log/case2 -index test_case2&lt;/P&gt;

&lt;P&gt;Error is 
In handler 'monitor': Parameter index: Index 'test_case1' does not exist. Please provide a valid index.&lt;/P&gt;

&lt;P&gt;I searched through Answers and Documentation but I cannot seem to put together a solution for this.&lt;/P&gt;

&lt;P&gt;Any help is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2011 04:28:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-custom-index-for-Universal-Forwarder/m-p/65512#M13156</guid>
      <dc:creator>mehmettecer</dc:creator>
      <dc:date>2011-03-23T04:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom index for Universal Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-custom-index-for-Universal-Forwarder/m-p/65513#M13157</link>
      <description>&lt;P&gt;There was a very similar question posted a couple of hours ago that has an excellent answer:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/questions/12923/indexes-and-universal-forwarder" rel="nofollow"&gt;http://answers.splunk.com/questions/12923/indexes-and-universal-forwarder&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2011 04:33:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-custom-index-for-Universal-Forwarder/m-p/65513#M13157</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2011-03-23T04:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom index for Universal Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-custom-index-for-Universal-Forwarder/m-p/65514#M13158</link>
      <description>&lt;P&gt;Hi Ayn, I already saw that answer and tried proposed solution but I still don't see my log files indexed under custom index I created.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2011 04:46:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-custom-index-for-Universal-Forwarder/m-p/65514#M13158</guid>
      <dc:creator>mehmettecer</dc:creator>
      <dc:date>2011-03-23T04:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom index for Universal Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-custom-index-for-Universal-Forwarder/m-p/65515#M13159</link>
      <description>&lt;P&gt;I'd consider this a bug in the CLI, but your best bet is to just edit the inputs.conf file, find the monitor stanza, and add the &lt;CODE&gt;index=test_case2&lt;/CODE&gt; line to it, e.g.:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log/case1]
index = test_case2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The file is &lt;EM&gt;probably&lt;/EM&gt; in &lt;CODE&gt;$SPLUNK_HOME/etc/apps/search/local/&lt;/CODE&gt;, but you might have to look for it:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;./splunk cmd btool --debug inputs list monitor:///var/log/case
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;find $SPLUNK_HOME/etc -name inputs.conf | xargs grep -l '^\[monitor:///var/log/case'
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Mar 2011 05:27:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-custom-index-for-Universal-Forwarder/m-p/65515#M13159</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-03-23T05:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom index for Universal Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-custom-index-for-Universal-Forwarder/m-p/65516#M13160</link>
      <description>&lt;P&gt;This issue has been reported to support and a Enhancement Request has been filed on the behavior. The CLI has been implemented consistently across all Splunk Components. &lt;/P&gt;

&lt;P&gt;There has been a feature request filed to allow for a remote index command line argument, and/or a warning message to ensure the user understands a remote index must exist if Splunk does not have one that exists locally. &lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2011 00:00:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-custom-index-for-Universal-Forwarder/m-p/65516#M13160</guid>
      <dc:creator>jbsplunk</dc:creator>
      <dc:date>2011-03-24T00:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom index for Universal Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-custom-index-for-Universal-Forwarder/m-p/65517#M13161</link>
      <description>&lt;P&gt;This is problematic in 4.3.2 as you mentioned, but in 4.3.3 and going forward, there is a parameter (&lt;STRONG&gt;check-index&lt;/STRONG&gt;) that you can set to make this to happen without getting an error message complaining about the nonexistent index. By setting check-index to false, Universal Forwarder would not require the index to be there to begin with, but this is not the default behavior in 4.3.3.&lt;/P&gt;

&lt;P&gt;For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;./splunk add monitor /var/log/case1 -index test_case1 -check-index false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The &lt;STRONG&gt;default&lt;/STRONG&gt; behavior is different depending on the version&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;4.3.3 universal forwarder: default check-index is &lt;STRONG&gt;true&lt;/STRONG&gt;, which means that it would always check whether the index exists&lt;/LI&gt;
&lt;LI&gt;4.3.4 universal forwarder: default check-index is &lt;STRONG&gt;true&lt;/STRONG&gt;, which means that it would always check whether the index exists&lt;/LI&gt;
&lt;LI&gt;4.3.5 universal forwarder: default check-index is &lt;STRONG&gt;true&lt;/STRONG&gt;, which means that it would always check whether the index exists&lt;/LI&gt;
&lt;LI&gt;5.0.2 universal forwarder: default check-index is &lt;STRONG&gt;false&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 14 Mar 2013 09:27:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-custom-index-for-Universal-Forwarder/m-p/65517#M13161</guid>
      <dc:creator>mic</dc:creator>
      <dc:date>2013-03-14T09:27:32Z</dc:date>
    </item>
  </channel>
</rss>

