<?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: Duplicate data because of file parts in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33828#M6078</link>
    <description>&lt;P&gt;Did you clean out the fishbucket as well? Unless you do so, Splunk will not re-index the files. &lt;/P&gt;

&lt;P&gt;That is an index (which can be cleaned) where splunk stores what it has already seen (files, offset-pointers). Beware though that if you clean this, splunk will re-index any file it's been configured to monitor (if they're still there).&lt;/P&gt;

&lt;P&gt;Oh, for reasons that you've just experienced, you should not copy huge files over the network directly into a monitored folder. It's better to copy it to a temp folder (on the same file system) and then move it into the monitored folder.&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
    <pubDate>Wed, 15 May 2013 10:59:23 GMT</pubDate>
    <dc:creator>kristian_kolb</dc:creator>
    <dc:date>2013-05-15T10:59:23Z</dc:date>
    <item>
      <title>Duplicate data because of file parts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33821#M6071</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I took 6 log files. The sum of events from all the log files is 10666.&lt;/P&gt;

&lt;P&gt;I added the log files into my forwarder node. &lt;/P&gt;

&lt;P&gt;When i checked the index: &lt;CODE&gt;index=my_raw_index&lt;/CODE&gt; The data showed was 21332. Double of actual count.&lt;/P&gt;

&lt;P&gt;When i checked the source, there are 12 sources instead of 6. Some source types are fileparts of actual log file. Its like &lt;CODE&gt;mylog.log-20130514.filepart&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;If i run a query: &lt;CODE&gt;index=my_raw_index | where like(source, "%20130514"),&lt;/CODE&gt; it gives me 10666. &lt;/P&gt;

&lt;P&gt;Since the file size is huge, it took sometime for the log files to get copied completely.&lt;/P&gt;

&lt;P&gt;I have following settings in inputs.conf file of forwarder node.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///home/data/aaa/bbb/*]
disabled = false
sourcetype = bbb_ccc
index = my_raw_index
crcSalt = SOURCE
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note: For crcSalt, angular brackets are there. Here i took it out since nothing was getting displayed.&lt;/P&gt;

&lt;P&gt;How to avoid this filepart indexing. What settings should be enabled so that data is not indexed twice.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;Strive&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2013 22:07:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33821#M6071</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2013-05-14T22:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate data because of file parts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33822#M6072</link>
      <description>&lt;OL&gt;
&lt;LI&gt;You most likely should be blacklisting the *.filepart files since they are partial files.  You can do this by adding the following line to your monitor stanza:&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;blacklist = \.(filepart)$&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;Remove "crcSalt = SOURCE".  &lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;You'll need to re-index those log files as Splunk has already seen them and will not re-index them unless you do something like clean the index (if that's possible on this index.)&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 14 May 2013 22:19:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33822#M6072</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2013-05-14T22:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate data because of file parts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33823#M6073</link>
      <description>&lt;P&gt;Thank you for your response. I will check your solution.&lt;BR /&gt;
The combined size of 6 log files is 4.5 MB.&lt;/P&gt;

&lt;P&gt;Should i use [batch] rather than monitor in this scenario. Actually in production environment it will be around 7MB.&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2013 22:27:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33823#M6073</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2013-05-14T22:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate data because of file parts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33824#M6074</link>
      <description>&lt;P&gt;You should really only use batch for one time read and destruct of your log files.  Please refer to the documentation for batch input to confirm if that's what you really want to do.&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2013 22:36:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33824#M6074</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2013-05-14T22:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate data because of file parts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33825#M6075</link>
      <description>&lt;P&gt;The combined size of 6 log files is 4.5 MB.&lt;/P&gt;

&lt;P&gt;In production the combined size of log files would be around 8 MB&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2013 22:58:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33825#M6075</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2013-05-14T22:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate data because of file parts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33826#M6076</link>
      <description>&lt;P&gt;I cleaned the index. Added blacklist = .(filepart)$&lt;BR /&gt;
I did not remove crcSalt=&lt;SOURCE&gt;.&lt;/SOURCE&gt;&lt;/P&gt;

&lt;P&gt;Data is not getting indexed.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2013 07:07:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33826#M6076</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2013-05-15T07:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate data because of file parts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33827#M6077</link>
      <description>&lt;P&gt;Its working. Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2013 10:56:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33827#M6077</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2013-05-15T10:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate data because of file parts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33828#M6078</link>
      <description>&lt;P&gt;Did you clean out the fishbucket as well? Unless you do so, Splunk will not re-index the files. &lt;/P&gt;

&lt;P&gt;That is an index (which can be cleaned) where splunk stores what it has already seen (files, offset-pointers). Beware though that if you clean this, splunk will re-index any file it's been configured to monitor (if they're still there).&lt;/P&gt;

&lt;P&gt;Oh, for reasons that you've just experienced, you should not copy huge files over the network directly into a monitored folder. It's better to copy it to a temp folder (on the same file system) and then move it into the monitored folder.&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2013 10:59:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33828#M6078</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-05-15T10:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate data because of file parts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33829#M6079</link>
      <description>&lt;P&gt;Thanks a lot kristian. Your suggestion makes sense to copy the files to temp folder first.&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2013 09:32:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33829#M6079</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2013-05-23T09:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate data because of file parts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33830#M6080</link>
      <description>&lt;P&gt;This solution worked...thanks  #the_wolverine&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2017 05:36:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Duplicate-data-because-of-file-parts/m-p/33830#M6080</guid>
      <dc:creator>BansodeSantosh</dc:creator>
      <dc:date>2017-05-09T05:36:39Z</dc:date>
    </item>
  </channel>
</rss>

