<?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: Need help with inputs.conf in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Need-help-with-inputs-conf/m-p/465804#M80271</link>
    <description>&lt;P&gt;I update the inputs again:&lt;BR /&gt;
[monitor:///var/log]&lt;BR /&gt;
whitelist=(.log|log$|messages|secure|auth|mesg$|cron$|acpid$|.out)&lt;BR /&gt;
blacklist=(lastlog|anaconda.syslog|.bz2$)&lt;BR /&gt;
index=nix_os&lt;BR /&gt;
disabled = 0&lt;/P&gt;

&lt;P&gt;[monitor:///var/log/remote/.../messages]&lt;BR /&gt;
whitelist=(archive|_messages.log|_messages.log-)&lt;BR /&gt;
blacklist=(.bz2$)&lt;BR /&gt;
index=nix_os&lt;BR /&gt;
sourcetype = syslog&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
recursive=true&lt;/P&gt;

&lt;P&gt;[monitor:///var/log/remote/.../audisp]&lt;BR /&gt;
whitelist=(archive|_audisp.log|\audisp.log-)&lt;BR /&gt;
blacklist=(.bz2$)&lt;BR /&gt;
index=nix_os&lt;BR /&gt;
sourcetype = linux:audit&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
recursive=true&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 04:06:03 GMT</pubDate>
    <dc:creator>tkw03</dc:creator>
    <dc:date>2020-09-30T04:06:03Z</dc:date>
    <item>
      <title>Need help with inputs.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-help-with-inputs-conf/m-p/465802#M80269</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I have some directories that I need to monitor. Using updated inputs for the TA_nix app I am adding syslog/linux:audit data is specific paths. It mostly works as expected BUT I had a few outliers.&lt;/P&gt;

&lt;P&gt;Heres the basic directory structure:&lt;BR /&gt;
/var/log is standard BUT the messages coming from other hosts goes to a path &lt;BR /&gt;
/var/log/remote&lt;BR /&gt;
in this path is the 2 types of logs: syslog and linux:audit as well as .bz2 which we never want indexed from any path.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/var/log/remote/202/02/&amp;lt;environment_name&amp;gt;/messages/&amp;lt;files&amp;gt;
/var/log/remote/202/02/&amp;lt;environment_name&amp;gt;/audisp/&amp;lt;files&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;within each one of these is an archive directory as well, it contains files being written to and .bz2 which we never want indexed from any path.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/var/log/remote/202/02/&amp;lt;environment_name&amp;gt;/messages/archive/&amp;lt;files&amp;gt;
/var/log/remote/202/02/&amp;lt;environment_name&amp;gt;/audisp/archive/&amp;lt;files&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So the inputs I created looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log]
whitelist=(\.log|log$|messages|secure|auth|mesg$|cron$|acpid$|\.out)
blacklist=(lastlog|anaconda\.syslog|\.bz2$|audisp|\_audisp.log|\audisp.log\-)
index=nix_os
disabled = 0


[monitor:///var/log/remote/*]
whitelist=(messages|\_messages\.log|_messages\.log\-)
blacklist=(\.bz2$|audisp|\_audisp.log|\audisp.log\-)
index=nix_os
sourcetype = syslog
disabled = 0
recursive=true


[monitor:///var/log/remote/*]
whitelist=(audisp|\_audisp.log|\audisp.log\-)
blacklist=(\.bz2$|\_messages\.log|_messages\.log\-)
index=nix_os
sourcetype = linux:audit
disabled = 0
recursive=true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I have found is that there are files with the sourcetype set as the filename, which it should be either syslog or linux:audit since the path is:&lt;BR /&gt;
/var/log/remote/2020/02/corp/messages/archive/hostname.domain.com_messages.log-20200206&lt;/P&gt;

&lt;P&gt;got the sourcetype set to the file name:&lt;BR /&gt;
hostname.domain.com_messages.log-20200206&lt;/P&gt;

&lt;P&gt;Also these did not index:&lt;BR /&gt;
/var/log/remote/2020/02/corp2/audisp/archive/:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;ip-hidden&amp;gt;_messages_audisp.log-20200204
&amp;lt;ip-hidden&amp;gt;_messages_audisp.log-20200205 
&amp;lt;ip-hidden&amp;gt;_messages_audisp.log-20200206 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can anyone tell me:&lt;/P&gt;

&lt;P&gt;1.Why did the messages file &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;hostname1234.domain.com_messages.log-20200206
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;get the sourcetype set to the file name (some are set to "too-small" as well)&lt;BR /&gt;
sourcetype=hostname1234.domain.com_messages or sourcetype=hostname1234.domain.com_messages-too_small&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;Why didnt the /audisp directory and the corresponding files index? For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/var/log/remote/2020/02/corp2/audisp/archive/&amp;lt;ip-hidden&amp;gt;_messages_audisp.log-20200204
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Thanks for you assistance&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:05:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-help-with-inputs-conf/m-p/465802#M80269</guid>
      <dc:creator>tkw03</dc:creator>
      <dc:date>2020-09-30T04:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with inputs.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-help-with-inputs-conf/m-p/465803#M80270</link>
      <description>&lt;P&gt;Updated my inputs to this, just in acse something was blacklisting for some reason, still not getting the audisp files and still getting too_small sourcetype and sourcetype=filename on the syslog files:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log]
whitelist=(\.log|log$|messages|secure|auth|mesg$|cron$|acpid$|\.out)
blacklist=(lastlog|anaconda\.syslog|\.bz2$)
index=nix_os
disabled = 0


[monitor:///var/log/remote/*]
whitelist=(messages|\_messages\.log|_messages\.log\-)
blacklist=(\.bz2$)
index=nix_os
sourcetype = syslog
disabled = 0
recursive=true


[monitor:///var/log/remote/*]
whitelist=(audisp|\_audisp.log|\audisp.log\-)
blacklist=(\.bz2$)
index=nix_os
sourcetype = linux:audit
disabled = 0
recursive=true
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Feb 2020 17:31:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-help-with-inputs-conf/m-p/465803#M80270</guid>
      <dc:creator>tkw03</dc:creator>
      <dc:date>2020-02-12T17:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with inputs.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-help-with-inputs-conf/m-p/465804#M80271</link>
      <description>&lt;P&gt;I update the inputs again:&lt;BR /&gt;
[monitor:///var/log]&lt;BR /&gt;
whitelist=(.log|log$|messages|secure|auth|mesg$|cron$|acpid$|.out)&lt;BR /&gt;
blacklist=(lastlog|anaconda.syslog|.bz2$)&lt;BR /&gt;
index=nix_os&lt;BR /&gt;
disabled = 0&lt;/P&gt;

&lt;P&gt;[monitor:///var/log/remote/.../messages]&lt;BR /&gt;
whitelist=(archive|_messages.log|_messages.log-)&lt;BR /&gt;
blacklist=(.bz2$)&lt;BR /&gt;
index=nix_os&lt;BR /&gt;
sourcetype = syslog&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
recursive=true&lt;/P&gt;

&lt;P&gt;[monitor:///var/log/remote/.../audisp]&lt;BR /&gt;
whitelist=(archive|_audisp.log|\audisp.log-)&lt;BR /&gt;
blacklist=(.bz2$)&lt;BR /&gt;
index=nix_os&lt;BR /&gt;
sourcetype = linux:audit&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
recursive=true&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:06:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-help-with-inputs-conf/m-p/465804#M80271</guid>
      <dc:creator>tkw03</dc:creator>
      <dc:date>2020-09-30T04:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with inputs.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-help-with-inputs-conf/m-p/465805#M80272</link>
      <description>&lt;P&gt;Found a BUNCH of my audit data in the vmstat sourcetype. How would this happen?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 18:44:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-help-with-inputs-conf/m-p/465805#M80272</guid>
      <dc:creator>tkw03</dc:creator>
      <dc:date>2020-02-12T18:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with inputs.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-help-with-inputs-conf/m-p/465806#M80273</link>
      <description>&lt;P&gt;You can't have (as per your original post) two monitors on the same path:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log/remote/*]
 whitelist=(messages|\_messages\.log|_messages\.log\-)
 blacklist=(\.bz2$)
 index=nix_os
 sourcetype = syslog
 disabled = 0
 recursive=true

 [monitor:///var/log/remote/*]
 whitelist=(audisp|\_audisp.log|\audisp.log\-)
 blacklist=(\.bz2$)
 index=nix_os
 sourcetype = linux:audit
 disabled = 0
 recursive=true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Only one of these will ever take effect - the first one I think, which is why your audit logs were not correctly picked up.&lt;/P&gt;

&lt;P&gt;Your latest comment has the correct approach:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log/remote/.../messages]
whitelist=(archive|_messages.log|_messages.log-)
blacklist=(.bz2$)
index=nix_os
sourcetype = syslog
disabled = 0
recursive=true

[monitor:///var/log/remote/.../audisp]
whitelist=(archive|_audisp.log|\audisp.log-)
blacklist=(.bz2$)
index=nix_os
sourcetype = linux:audit
disabled = 0
recursive=true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You probably want to associate a hostname to these logs too - is corp/corp2 the hostname?&lt;BR /&gt;
in which case you can add &lt;CODE&gt;host_segment = 6&lt;/CODE&gt; to each monitor to associate them with the hostname from the 6th segment in the filename&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 14:08:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-help-with-inputs-conf/m-p/465806#M80273</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-02-18T14:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with inputs.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-help-with-inputs-conf/m-p/465807#M80274</link>
      <description>&lt;P&gt;Thanks for the response! My issues now are that:&lt;/P&gt;

&lt;P&gt;small files in the /messages path get either the filename as the sourcetype OR they get "too_small" added to the sourcetype.&lt;/P&gt;

&lt;P&gt;All of the linux:audit logs got indexed with the vmstat source/sourcetype.&lt;/P&gt;

&lt;P&gt;Any ideas on how to fix/make correct for future data?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 14:18:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-help-with-inputs-conf/m-p/465807#M80274</guid>
      <dc:creator>tkw03</dc:creator>
      <dc:date>2020-02-18T14:18:14Z</dc:date>
    </item>
  </channel>
</rss>

