<?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 when monitoring a directory in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/duplicate-data-when-monitoring-a-directory/m-p/340726#M62836</link>
    <description>&lt;P&gt;The checksum will have changed once the data is compressed into bz2 format and therefore Splunk will read the data again...you could blacklist the files or whitelist in the inputs.conf (as per &lt;A href="https://answers.splunk.com/answers/560579/splunk-forwarder-configuration.html#answer-560580"&gt;https://answers.splunk.com/answers/560579/splunk-forwarder-configuration.html#answer-560580&lt;/A&gt; )&lt;/P&gt;</description>
    <pubDate>Fri, 04 Aug 2017 08:29:21 GMT</pubDate>
    <dc:creator>gjanders</dc:creator>
    <dc:date>2017-08-04T08:29:21Z</dc:date>
    <item>
      <title>duplicate data when monitoring a directory</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/duplicate-data-when-monitoring-a-directory/m-p/340721#M62831</link>
      <description>&lt;P&gt;Logs land in the logfile on the syslog server and logrotate/timestamp.script runs to roll the logs.&lt;BR /&gt;
The problem I am having is duplicate data is coming into the Splunk index. Splunk seems to be reading rolled .bz2 file as new data while also reading the logfile as new data. Below are my configurations. Any ideas? Thanks.&lt;/P&gt;

&lt;P&gt;inputs.conf is below: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///logs/f5-host1/]
_TCP_ROUTING = group1
disabled = false
host = host1
index = index1
sourcetype = index1
whitelist = \.bz2$|/logfile$
ignoreOlderThan = 20d
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The log folder is below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;-rw------- 1 Logz Logz  97138 Aug  1 13:04 f5-host1.2017-08-01-12.bz2
-rw------- 1 Logz Logz  105819 Aug  1 14:05 f5-host1.2017-08-01-13.bz2
-rw------- 1 Logz Logz  95384 Aug  1 15:05 f5-host1.2017-08-01-14.bz2
-rw------- 1 Logz Logz 342285 Aug  1 15:16 logfile
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Aug 2017 22:24:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/duplicate-data-when-monitoring-a-directory/m-p/340721#M62831</guid>
      <dc:creator>rewritex</dc:creator>
      <dc:date>2017-08-01T22:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate data when monitoring a directory</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/duplicate-data-when-monitoring-a-directory/m-p/340722#M62832</link>
      <description>&lt;P&gt;It looks like you have it setup to do both &lt;CODE&gt;bz2&lt;/CODE&gt; files and the raw &lt;CODE&gt;logfile&lt;/CODE&gt;.  While this was probably the right thing to do the first time you fired up Splunk on your forwarder (to get the stuff that you missed and was already rolled up), you need to remove the &lt;CODE&gt;bz2&lt;/CODE&gt; from the whitelist now or every time your &lt;CODE&gt;logfile&lt;/CODE&gt; rotates to a &lt;CODE&gt;bz2&lt;/CODE&gt; it will get forwarded again.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 02:56:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/duplicate-data-when-monitoring-a-directory/m-p/340722#M62832</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-08-02T02:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate data when monitoring a directory</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/duplicate-data-when-monitoring-a-directory/m-p/340723#M62833</link>
      <description>&lt;P&gt;Hi rewritex,&lt;BR /&gt;
why you have in whitelist also rolled files?&lt;BR /&gt;
try with&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///logs/f5-host1/logfile]
 _TCP_ROUTING = group1
 disabled = false
 host = host1
 index = index1
 sourcetype = index1
 ignoreOlderThan = 20d
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Why you use sourcetype like index?&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 07:29:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/duplicate-data-when-monitoring-a-directory/m-p/340723#M62833</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-08-02T07:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate data when monitoring a directory</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/duplicate-data-when-monitoring-a-directory/m-p/340724#M62834</link>
      <description>&lt;P&gt;Thanks. You seem to respond and answer the majority of my questions on the board. &lt;/P&gt;

&lt;P&gt;The original idea was to monitor the directory to help fight data loss between the Host and the indexer cluster. If the connection between the the host and cluster went down, I wanted Splunk to automatically pick backup where it left off when service was resolved and scan the rotated logs to pull in the data it needed to fill in the blanks from the downtime. &lt;/P&gt;

&lt;P&gt;I researched the forums and Splunk docs information to setup the inputs.conf to monitor the logfile and rolling log files to manage the above scenario. I was under the impression the rotated log would not be read because the CRC check would match and handle it in such a way for it not to be read again.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 17:15:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/duplicate-data-when-monitoring-a-directory/m-p/340724#M62834</guid>
      <dc:creator>rewritex</dc:creator>
      <dc:date>2017-08-03T17:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate data when monitoring a directory</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/duplicate-data-when-monitoring-a-directory/m-p/340725#M62835</link>
      <description>&lt;P&gt;Thanks for the response cuesllo. I put the full explanation in the previous comment. I whitelist the rolled files to help with data loss or network downtime. Sourcetype=index1 is fake, I changed it just for this post.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 17:16:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/duplicate-data-when-monitoring-a-directory/m-p/340725#M62835</guid>
      <dc:creator>rewritex</dc:creator>
      <dc:date>2017-08-03T17:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate data when monitoring a directory</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/duplicate-data-when-monitoring-a-directory/m-p/340726#M62836</link>
      <description>&lt;P&gt;The checksum will have changed once the data is compressed into bz2 format and therefore Splunk will read the data again...you could blacklist the files or whitelist in the inputs.conf (as per &lt;A href="https://answers.splunk.com/answers/560579/splunk-forwarder-configuration.html#answer-560580"&gt;https://answers.splunk.com/answers/560579/splunk-forwarder-configuration.html#answer-560580&lt;/A&gt; )&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2017 08:29:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/duplicate-data-when-monitoring-a-directory/m-p/340726#M62836</guid>
      <dc:creator>gjanders</dc:creator>
      <dc:date>2017-08-04T08:29:21Z</dc:date>
    </item>
  </channel>
</rss>

