<?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: monitor files in /var/log with different source types in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/monitor-files-in-var-log-with-different-source-types/m-p/53270#M10280</link>
    <description>&lt;P&gt;I think may be you mistyping :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log/apache2]
    sourcetype = apache
    index = main
    whitelist = (access|error)\.log$  # there is only one backslash before dot 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and you can try another way :&lt;BR /&gt;
in inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log]
    whitelist = /client\.log|/apache2/access\.log$|/apache2/error\.log$|/app2\.log # there is only one backslash before dot
    index = main
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;in props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/var/log/app1/client.log]
   sourcetype = app1
[source::/var/log/apache2/*.log]
   sourcetype = apache
[source::/var/log/app2.log]
   sourcetype = app2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 05 Aug 2011 14:41:40 GMT</pubDate>
    <dc:creator>dmlee</dc:creator>
    <dc:date>2011-08-05T14:41:40Z</dc:date>
    <item>
      <title>monitor files in /var/log with different source types</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/monitor-files-in-var-log-with-different-source-types/m-p/53269#M10279</link>
      <description>&lt;P&gt;I've seen variations of the question, but there must &lt;EM&gt;surely&lt;/EM&gt; be a way to do this.&lt;/P&gt;

&lt;P&gt;All our logs files are in /var/log/. We don't want all the logs to be classified as the same source type, how can we split out files? Must we select them individually? Why doesnt this work?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log/app1/client.log]
    sourcetype = app1
[monitor:///var/log/apache2]
    sourcetype = apache
    index = main
    _whitelist = apache2/(access|error).log$
[monitor:///var/log/app2.log]
    sourcetype = app2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Aug 2011 07:39:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/monitor-files-in-var-log-with-different-source-types/m-p/53269#M10279</guid>
      <dc:creator>asdfasdfasdflkj</dc:creator>
      <dc:date>2011-08-04T07:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: monitor files in /var/log with different source types</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/monitor-files-in-var-log-with-different-source-types/m-p/53270#M10280</link>
      <description>&lt;P&gt;I think may be you mistyping :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log/apache2]
    sourcetype = apache
    index = main
    whitelist = (access|error)\.log$  # there is only one backslash before dot 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and you can try another way :&lt;BR /&gt;
in inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log]
    whitelist = /client\.log|/apache2/access\.log$|/apache2/error\.log$|/app2\.log # there is only one backslash before dot
    index = main
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;in props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/var/log/app1/client.log]
   sourcetype = app1
[source::/var/log/apache2/*.log]
   sourcetype = apache
[source::/var/log/app2.log]
   sourcetype = app2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Aug 2011 14:41:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/monitor-files-in-var-log-with-different-source-types/m-p/53270#M10280</guid>
      <dc:creator>dmlee</dc:creator>
      <dc:date>2011-08-05T14:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: monitor files in /var/log with different source types</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/monitor-files-in-var-log-with-different-source-types/m-p/53271#M10281</link>
      <description>&lt;P&gt;Good answer. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 20:14:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/monitor-files-in-var-log-with-different-source-types/m-p/53271#M10281</guid>
      <dc:creator>pkeller</dc:creator>
      <dc:date>2016-06-22T20:14:03Z</dc:date>
    </item>
  </channel>
</rss>

