<?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 How to avoid duplicate log files from universal forwarder caused by customers compressing and exporting logs files on the device every 15 min? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-avoid-duplicate-log-files-from-universal-forwarder-caused/m-p/187023#M37413</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We have splunk UF installed on devices to send log files to another forwarder, which sends the logs to indexer.&lt;/P&gt;

&lt;P&gt;Splunk UF on Device --&amp;gt; Forwarder --&amp;gt; Indexer.&lt;/P&gt;

&lt;P&gt;The configurations are:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Splunk UF on Device&lt;/STRONG&gt;  &lt;/P&gt;

&lt;P&gt;&lt;EM&gt;inputs.conf&lt;/EM&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:&amp;lt;Path to the directory&amp;gt;]  
disabled = false
host_regex = _(\d+\.\d+\.\d+\.\d+)
sourcetype = abc_xyz
index = my_index
crcSalt = &amp;lt;SOURCE&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;EM&gt;outputs.conf&lt;/EM&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcpout]
disabled = false
defaultGroup = our_lwf

[tcpout:our_lwf]
server = &amp;lt;ip address of downward forwarder&amp;gt;:9998
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Forwarder node&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[splunktcp://:9998]
compressed=false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The issue is: We are getting duplicate log files. Same log files are sent twice. When we see the &lt;CODE&gt;_indextime&lt;/CODE&gt; of log events, we see two different times. First set got indexed at &lt;STRONG&gt;X&lt;/STRONG&gt; and the second set got indexed at &lt;STRONG&gt;X+Y minutes&lt;/STRONG&gt;.  The Y value varies from 11 to 13.&lt;/P&gt;

&lt;P&gt;Note: On the device, the customers are compressing the log files and exporting them to another location every 15 minutes. If this &lt;EM&gt;&lt;CODE&gt;compression and exporting&lt;/CODE&gt;&lt;/EM&gt; feature is turned off on the devices then we are not seeing duplicate logs. If the &lt;EM&gt;&lt;CODE&gt;compression and exporting&lt;/CODE&gt;&lt;/EM&gt; is turned on we see duplicate logs.&lt;/P&gt;

&lt;P&gt;Could you please let me know how to avoid duplicate log files getting into the system.&lt;/P&gt;

&lt;P&gt;Thanks  &lt;/P&gt;

&lt;P&gt;Strive&lt;/P&gt;</description>
    <pubDate>Tue, 28 Oct 2014 14:22:51 GMT</pubDate>
    <dc:creator>strive</dc:creator>
    <dc:date>2014-10-28T14:22:51Z</dc:date>
    <item>
      <title>How to avoid duplicate log files from universal forwarder caused by customers compressing and exporting logs files on the device every 15 min?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-avoid-duplicate-log-files-from-universal-forwarder-caused/m-p/187023#M37413</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We have splunk UF installed on devices to send log files to another forwarder, which sends the logs to indexer.&lt;/P&gt;

&lt;P&gt;Splunk UF on Device --&amp;gt; Forwarder --&amp;gt; Indexer.&lt;/P&gt;

&lt;P&gt;The configurations are:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Splunk UF on Device&lt;/STRONG&gt;  &lt;/P&gt;

&lt;P&gt;&lt;EM&gt;inputs.conf&lt;/EM&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:&amp;lt;Path to the directory&amp;gt;]  
disabled = false
host_regex = _(\d+\.\d+\.\d+\.\d+)
sourcetype = abc_xyz
index = my_index
crcSalt = &amp;lt;SOURCE&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;EM&gt;outputs.conf&lt;/EM&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcpout]
disabled = false
defaultGroup = our_lwf

[tcpout:our_lwf]
server = &amp;lt;ip address of downward forwarder&amp;gt;:9998
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Forwarder node&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[splunktcp://:9998]
compressed=false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The issue is: We are getting duplicate log files. Same log files are sent twice. When we see the &lt;CODE&gt;_indextime&lt;/CODE&gt; of log events, we see two different times. First set got indexed at &lt;STRONG&gt;X&lt;/STRONG&gt; and the second set got indexed at &lt;STRONG&gt;X+Y minutes&lt;/STRONG&gt;.  The Y value varies from 11 to 13.&lt;/P&gt;

&lt;P&gt;Note: On the device, the customers are compressing the log files and exporting them to another location every 15 minutes. If this &lt;EM&gt;&lt;CODE&gt;compression and exporting&lt;/CODE&gt;&lt;/EM&gt; feature is turned off on the devices then we are not seeing duplicate logs. If the &lt;EM&gt;&lt;CODE&gt;compression and exporting&lt;/CODE&gt;&lt;/EM&gt; is turned on we see duplicate logs.&lt;/P&gt;

&lt;P&gt;Could you please let me know how to avoid duplicate log files getting into the system.&lt;/P&gt;

&lt;P&gt;Thanks  &lt;/P&gt;

&lt;P&gt;Strive&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2014 14:22:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-avoid-duplicate-log-files-from-universal-forwarder-caused/m-p/187023#M37413</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-10-28T14:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid duplicate log files from universal forwarder caused by customers compressing and exporting logs files on the device every 15 min?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-avoid-duplicate-log-files-from-universal-forwarder-caused/m-p/187024#M37414</link>
      <description>&lt;P&gt;Additional details:&lt;/P&gt;

&lt;P&gt;Splunk UF version on device is: 4.3.x&lt;/P&gt;

&lt;P&gt;Splunk version on downward forwarder is 5.0.4&lt;/P&gt;

&lt;P&gt;Even though we have set compressed as false in downward forwarder, We tried adding &lt;CODE&gt;blacklist = \.(gz)$&lt;/CODE&gt; in the inputs.conf of Splunk UF on device. It doesn't work. We still get duplicate log files.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2014 14:29:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-avoid-duplicate-log-files-from-universal-forwarder-caused/m-p/187024#M37414</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-10-28T14:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid duplicate log files from universal forwarder caused by customers compressing and exporting logs files on the device every 15 min?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-avoid-duplicate-log-files-from-universal-forwarder-caused/m-p/187025#M37415</link>
      <description>&lt;P&gt;re-added the blacklist configurations, restarted splunk and it is working&lt;/P&gt;

&lt;P&gt;Enabled the TailingProcessor in DEBUG mode to check.. the splunkd.log clearly shows that the .gz files are ignored.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;10-29-2014 12:18:19.380 +0000 DEBUG TailingProcessor - File state notification for path='our_path/file.gz' (first time).
10-29-2014 12:18:19.381 +0000 DEBUG TailingProcessor -   Item 'our_path.gz' matches stanza: our_path_*.
10-29-2014 12:18:19.381 +0000 DEBUG TailingProcessor -     Not using stanza for this item (Matched blacklist '\.(gz)$'.).
10-29-2014 12:18:19.381 +0000 DEBUG TailingProcessor -   Entry is associated with 0 configuration(s).
10-29-2014 12:18:19.381 +0000 DEBUG TailingProcessor - No configurations match, will ignore path='our_path/file.gz'.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;During checks i came to know that splunk was not restarted when changes were made earlier. Not restarting splunk was the issue &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Oct 2014 12:49:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-avoid-duplicate-log-files-from-universal-forwarder-caused/m-p/187025#M37415</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-10-29T12:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid duplicate log files from universal forwarder caused by customers compressing and exporting logs files on the device every 15 min?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-avoid-duplicate-log-files-from-universal-forwarder-caused/m-p/187026#M37416</link>
      <description>&lt;P&gt;you can use&lt;BR /&gt;
"followtail = true "&lt;BR /&gt;
option.&lt;BR /&gt;
you have to add this line in inputs.conf configure file for every stanza.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2015 09:36:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-avoid-duplicate-log-files-from-universal-forwarder-caused/m-p/187026#M37416</guid>
      <dc:creator>srisahitya_v</dc:creator>
      <dc:date>2015-08-11T09:36:56Z</dc:date>
    </item>
  </channel>
</rss>

