<?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 do I get multiple sourcetypes from one source? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-get-multiple-sourcetypes-from-one-source/m-p/160375#M32516</link>
    <description>&lt;P&gt;Serverclass.conf is used for your deployment server. This will not filter your inputs based on the file or event code. The whitelist / blacklist function in serverclass.conf is for host filtering. &lt;/P&gt;

&lt;P&gt;You need to create two serverclasses; e.g., Sourcetype1 and Sourcetype2&lt;/P&gt;

&lt;P&gt;In the whitelist for each of those, enter the hostname..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [serverClass:sample1]
 whitelist.0 = myhostforsourcetype1.mydomain.com
 machineTypesFilter = linux*
 restartSplunkd = true
 [serverClass:sample1:app:sample1]

 [serverClass:sample2]
 whitelist.0 = myhostforsourcetype2.mydomain.com 
 machineTypesFilter = linux*
 restartSplunkd = true
 [serverClass:sample2:app:sample2]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In those apps, you define the specific input and sourcetypes as you have done for the inputs.conf.&lt;/P&gt;

&lt;P&gt;Refer to documentation for this here: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.2/Updating/Useserverclass.conf"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.2/Updating/Useserverclass.conf&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Apr 2015 01:48:21 GMT</pubDate>
    <dc:creator>esix_splunk</dc:creator>
    <dc:date>2015-04-29T01:48:21Z</dc:date>
    <item>
      <title>How do I get multiple sourcetypes from one source?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-get-multiple-sourcetypes-from-one-source/m-p/160373#M32514</link>
      <description>&lt;P&gt;I have one file that I need to pull two sourcetypes from.  Here are the details:&lt;/P&gt;

&lt;P&gt;i created two independent inputs.conf files.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;inputs.conf
[monitor:///var/log/audit/audit.log]
index=sample
sourcetype=sample1



inputs.conf
[monitor:///var/log/audit/audit.log]
index=sample
sourcetype=sample2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My serverclass.conf file is set up with two stanzas:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[serverClass:sample1]
whitelist.0 = /var/opt/specific/to/sample1* 
machineTypesFilter = linux*
restartSplunkd = true
[serverClass:sample1:app:sample1]

[serverClass:sample2]
whitelist.0 = /var/opt/specific/to/sample2* 
machineTypesFilter = linux*
restartSplunkd = true
[serverClass:sample2:app:sample2]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am using the whitelist to identify key information within the log.  The data is coming through with both whitelist details, but it is defaulting to only one sourcetype.  My whitelist also contains host information which is also shared.  The only thing that separates the sourcetypes is the /var/opt/specific/to/sample* details.  I don't think host details matter, so I left these details in.  Do I need to add an AND statement in there?  &lt;/P&gt;

&lt;P&gt;[serverClass:sample1]&lt;BR /&gt;
    whitelist.0 = /var/opt/specific/to/sample1* &lt;STRONG&gt;AND&lt;/STRONG&gt;&lt;BR /&gt;
    whitelist.1 = host&lt;BR /&gt;
    machineTypesFilter = linux*&lt;BR /&gt;
    restartSplunkd = true&lt;BR /&gt;
    [serverClass:sample1:app:sample1]&lt;/P&gt;

&lt;P&gt;Or is there something else that i should consider?&lt;/P&gt;

&lt;P&gt;Thanks, Jennifer&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2015 01:04:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-get-multiple-sourcetypes-from-one-source/m-p/160373#M32514</guid>
      <dc:creator>jldebell</dc:creator>
      <dc:date>2015-04-29T01:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get multiple sourcetypes from one source?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-get-multiple-sourcetypes-from-one-source/m-p/160374#M32515</link>
      <description>&lt;P&gt;Adding a wildcard to see if it will work.  &lt;/P&gt;

&lt;P&gt;whitelist.0 = ***&lt;EM&gt;/var/opt/specific/to/sample2&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2015 01:43:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-get-multiple-sourcetypes-from-one-source/m-p/160374#M32515</guid>
      <dc:creator>jldebell</dc:creator>
      <dc:date>2015-04-29T01:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get multiple sourcetypes from one source?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-get-multiple-sourcetypes-from-one-source/m-p/160375#M32516</link>
      <description>&lt;P&gt;Serverclass.conf is used for your deployment server. This will not filter your inputs based on the file or event code. The whitelist / blacklist function in serverclass.conf is for host filtering. &lt;/P&gt;

&lt;P&gt;You need to create two serverclasses; e.g., Sourcetype1 and Sourcetype2&lt;/P&gt;

&lt;P&gt;In the whitelist for each of those, enter the hostname..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [serverClass:sample1]
 whitelist.0 = myhostforsourcetype1.mydomain.com
 machineTypesFilter = linux*
 restartSplunkd = true
 [serverClass:sample1:app:sample1]

 [serverClass:sample2]
 whitelist.0 = myhostforsourcetype2.mydomain.com 
 machineTypesFilter = linux*
 restartSplunkd = true
 [serverClass:sample2:app:sample2]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In those apps, you define the specific input and sourcetypes as you have done for the inputs.conf.&lt;/P&gt;

&lt;P&gt;Refer to documentation for this here: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.2/Updating/Useserverclass.conf"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.2/Updating/Useserverclass.conf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2015 01:48:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-get-multiple-sourcetypes-from-one-source/m-p/160375#M32516</guid>
      <dc:creator>esix_splunk</dc:creator>
      <dc:date>2015-04-29T01:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get multiple sourcetypes from one source?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-get-multiple-sourcetypes-from-one-source/m-p/160376#M32517</link>
      <description>&lt;P&gt;Thanks for the information.  If i am reading this correctly, I need to add the host details in to decipher the difference between the logs?  The host details and the source are the same in both instances.  It is only the log content that makes it different.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2015 16:02:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-get-multiple-sourcetypes-from-one-source/m-p/160376#M32517</guid>
      <dc:creator>jldebell</dc:creator>
      <dc:date>2015-04-30T16:02:43Z</dc:date>
    </item>
  </channel>
</rss>

