<?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: Log rotation for compressed files in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Log-rotation-for-compressed-files/m-p/76944#M15731</link>
    <description>&lt;P&gt;You can add whitelists/blacklists to your inputs.conf to filter out unwanted files:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;blacklist = \.(gz)$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Should filter out anything in the folder with a .gz extension.  (Or you could just whitelist .log files to get the same result.  Depends on what else is in there)&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.2/Data/Whitelistorblacklistspecificincomingdata"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.2/Data/Whitelistorblacklistspecificincomingdata&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jun 2012 20:45:07 GMT</pubDate>
    <dc:creator>emiller42</dc:creator>
    <dc:date>2012-06-15T20:45:07Z</dc:date>
    <item>
      <title>Log rotation for compressed files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Log-rotation-for-compressed-files/m-p/76943#M15730</link>
      <description>&lt;P&gt;We are using Splunk to monitor server.log file from a JBoss instance that rolls over daily (we use the logrotate utility to gz server.log daily)&lt;/P&gt;

&lt;P&gt;The folder looks like this inside : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;//var/log

//server.log

//server.log.June-12.gz

//server.log.June-13.gz

//server.log.June-14.gz

//server.log.June-15.gz
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;//&lt;/P&gt;

&lt;P&gt;We use the universal forwarder on this linux box to push data out to the indexer.&lt;/P&gt;

&lt;P&gt;Currently: Our configuration in the inputs.conf on the forwarder side looks like this. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://var/log/jboss_logs/server*]

disabled=0

index=os

sourcetype=serverlog
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What this does unfortunately is that &lt;STRONG&gt;it gets the daily server.log (which its supposed to because of the server* wildcard)  -- and then, everyday it indexes the uncompressed content of the server.*.gz files that are out there&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Based on what is described here - apparently log rotation does not apply to the .gz and .tar file formats because they are treated as new files:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/MonitorFilesAndDirectories"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Data/MonitorFilesAndDirectories&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Does this mean that we will definitely see duplicates ?  Has anybody seen a problem like this previously ?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2012 18:53:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Log-rotation-for-compressed-files/m-p/76943#M15730</guid>
      <dc:creator>asarolkar</dc:creator>
      <dc:date>2012-06-15T18:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Log rotation for compressed files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Log-rotation-for-compressed-files/m-p/76944#M15731</link>
      <description>&lt;P&gt;You can add whitelists/blacklists to your inputs.conf to filter out unwanted files:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;blacklist = \.(gz)$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Should filter out anything in the folder with a .gz extension.  (Or you could just whitelist .log files to get the same result.  Depends on what else is in there)&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.2/Data/Whitelistorblacklistspecificincomingdata"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.2/Data/Whitelistorblacklistspecificincomingdata&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2012 20:45:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Log-rotation-for-compressed-files/m-p/76944#M15731</guid>
      <dc:creator>emiller42</dc:creator>
      <dc:date>2012-06-15T20:45:07Z</dc:date>
    </item>
  </channel>
</rss>

