<?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: how to avoid duplicate data when a file is created with the same name which was delete earlier. in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/how-to-avoid-duplicate-data-when-a-file-is-created-with-the-same/m-p/172854#M34783</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;by default splunk reads the first few lines of a file (256 bytes) and calculates a hashvalue over those lines. When a new file with the same hash appears it isn't read. In your case, those first few lines are the same, therefore the file is reindexed again and you get your duplicates.&lt;/P&gt;

&lt;P&gt;You can adjust the amount of bytes that are read with this value in the inputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;initCrcLength = &amp;lt;integer&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is the &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Inputsconf"&gt;link&lt;/A&gt; to the examples and spec of the inputs.conf file.&lt;BR /&gt;
You can find additional details for initCrcLength there, and also much more configuration options for your inputs.&lt;/P&gt;

&lt;P&gt;Greetings&lt;/P&gt;

&lt;P&gt;Tom&lt;/P&gt;</description>
    <pubDate>Mon, 20 Oct 2014 12:05:59 GMT</pubDate>
    <dc:creator>tom_frotscher</dc:creator>
    <dc:date>2014-10-20T12:05:59Z</dc:date>
    <item>
      <title>how to avoid duplicate data when a file is created with the same name which was delete earlier.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-avoid-duplicate-data-when-a-file-is-created-with-the-same/m-p/172853#M34782</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I see duplicate data getting ingested when a file which was already ingested is being recreated upon a system failure with the existing data plus new data in the file.&lt;/P&gt;

&lt;P&gt;For example, lets say test.csv has the following data,&lt;/P&gt;

&lt;P&gt;a  b c&lt;/P&gt;

&lt;P&gt;When the file is deleted and recreated with the same name but with the following additional data,&lt;/P&gt;

&lt;P&gt;a b c&lt;BR /&gt;
1 2 3&lt;BR /&gt;
4 5 6&lt;/P&gt;

&lt;P&gt;it ingests a b c again besides 1 2 3...&lt;/P&gt;

&lt;P&gt;Can someone help me with the correct stanza to be added in inputs.conf or any other solution to avoid data being duplicated as per an example mentioned above.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Oct 2014 15:29:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-avoid-duplicate-data-when-a-file-is-created-with-the-same/m-p/172853#M34782</guid>
      <dc:creator>soniaraj13</dc:creator>
      <dc:date>2014-10-19T15:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to avoid duplicate data when a file is created with the same name which was delete earlier.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-avoid-duplicate-data-when-a-file-is-created-with-the-same/m-p/172854#M34783</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;by default splunk reads the first few lines of a file (256 bytes) and calculates a hashvalue over those lines. When a new file with the same hash appears it isn't read. In your case, those first few lines are the same, therefore the file is reindexed again and you get your duplicates.&lt;/P&gt;

&lt;P&gt;You can adjust the amount of bytes that are read with this value in the inputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;initCrcLength = &amp;lt;integer&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is the &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Inputsconf"&gt;link&lt;/A&gt; to the examples and spec of the inputs.conf file.&lt;BR /&gt;
You can find additional details for initCrcLength there, and also much more configuration options for your inputs.&lt;/P&gt;

&lt;P&gt;Greetings&lt;/P&gt;

&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Mon, 20 Oct 2014 12:05:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-avoid-duplicate-data-when-a-file-is-created-with-the-same/m-p/172854#M34783</guid>
      <dc:creator>tom_frotscher</dc:creator>
      <dc:date>2014-10-20T12:05:59Z</dc:date>
    </item>
  </channel>
</rss>

