<?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: Reset splunkforwarder to re-read file from beginning in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Reset-splunkforwarder-to-re-read-file-from-beginning/m-p/38771#M7164</link>
    <description>&lt;P&gt;Is it a one time need to re-index the file or is it going to continually monitor it?  I assume your 'app' index has other data and therefore we can't just clean the index and re-index the file?&lt;/P&gt;</description>
    <pubDate>Fri, 27 Apr 2012 18:07:23 GMT</pubDate>
    <dc:creator>sdaniels</dc:creator>
    <dc:date>2012-04-27T18:07:23Z</dc:date>
    <item>
      <title>Reset splunkforwarder to re-read file from beginning</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Reset-splunkforwarder-to-re-read-file-from-beginning/m-p/38770#M7163</link>
      <description>&lt;P&gt;I have a log file that I need to have the splunkforwarder re-start from the very beginning.&lt;BR /&gt;
my index.conf entry is this:&lt;BR /&gt;
[monitor:///var/log/app/prod/hostname0050.log]&lt;BR /&gt;
sourcetype=cmsdk_log&lt;BR /&gt;
index=app&lt;BR /&gt;
host=hostname0050&lt;BR /&gt;
followTail=0&lt;/P&gt;

&lt;P&gt;However I keep getting this message in the splunkd.log&lt;BR /&gt;
04-27-2012 10:15:27.053 -0700 INFO  WatchedFile - Will begin reading at offset=1361969172 for file='/var/log/app/prod/hostname0050.log'.&lt;/P&gt;

&lt;P&gt;I would like it to re-read the entire file to get the past history.&lt;BR /&gt;
Any thoughts?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2012 17:58:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Reset-splunkforwarder-to-re-read-file-from-beginning/m-p/38770#M7163</guid>
      <dc:creator>moshman</dc:creator>
      <dc:date>2012-04-27T17:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Reset splunkforwarder to re-read file from beginning</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Reset-splunkforwarder-to-re-read-file-from-beginning/m-p/38771#M7164</link>
      <description>&lt;P&gt;Is it a one time need to re-index the file or is it going to continually monitor it?  I assume your 'app' index has other data and therefore we can't just clean the index and re-index the file?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2012 18:07:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Reset-splunkforwarder-to-re-read-file-from-beginning/m-p/38771#M7164</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2012-04-27T18:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: Reset splunkforwarder to re-read file from beginning</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Reset-splunkforwarder-to-re-read-file-from-beginning/m-p/38772#M7165</link>
      <description>&lt;P&gt;Yes, the app index has a whole lot of other application data.&lt;BR /&gt;
This is just a one time re-index of the single file, once it reads it I was going to change it to just tail the file from that point on.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2012 18:09:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Reset-splunkforwarder-to-re-read-file-from-beginning/m-p/38772#M7165</guid>
      <dc:creator>moshman</dc:creator>
      <dc:date>2012-04-27T18:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: Reset splunkforwarder to re-read file from beginning</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Reset-splunkforwarder-to-re-read-file-from-beginning/m-p/38773#M7166</link>
      <description>&lt;P&gt;You could clean the fishbucket on the fowarder. That will cause to forwarder to start all over on it's inputs.&lt;BR /&gt;
Check out : &lt;A href="http://wiki.splunk.com/Community:HowSplunkReadsInputFiles"&gt;http://wiki.splunk.com/Community:HowSplunkReadsInputFiles&lt;/A&gt; and &lt;A href="http://blogs.splunk.com/2008/08/14/what-is-this-fishbucket-thing/"&gt;http://blogs.splunk.com/2008/08/14/what-is-this-fishbucket-thing/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2012 18:09:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Reset-splunkforwarder-to-re-read-file-from-beginning/m-p/38773#M7166</guid>
      <dc:creator>rroberts</dc:creator>
      <dc:date>2012-04-27T18:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Reset splunkforwarder to re-read file from beginning</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Reset-splunkforwarder-to-re-read-file-from-beginning/m-p/38774#M7167</link>
      <description>&lt;P&gt;You have several methods :&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;Recommended : reindex just one file : change the crc of the file.&lt;BR /&gt;
edit the file, add a first line, by example a comment." # splunk reindex".&lt;BR /&gt;
The tailing processor will compare the CRC of the first 256 chars of the file with the list he maintains, and will detect the file as a new one, and index it.&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;variant : if you are already using the option crcSalt=&lt;SOURCE&gt;, then the path+filename is used on the crc calculation. Then you just need to rename the file, or move it.&lt;/SOURCE&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Big guns : reset the forwarder for all logs, blow the fishbucket index that contain the position for each monitored files. Beware all will be reindexed.&lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
./splunk stop&lt;BR /&gt;
./splunk clean eventdata -index _fishbucket&lt;BR /&gt;
&lt;/CODE&gt; &lt;/P&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Fri, 27 Apr 2012 18:14:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Reset-splunkforwarder-to-re-read-file-from-beginning/m-p/38774#M7167</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2012-04-27T18:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Reset splunkforwarder to re-read file from beginning</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Reset-splunkforwarder-to-re-read-file-from-beginning/m-p/38775#M7168</link>
      <description>&lt;P&gt;In my case, I had access to splunk, but am not able to touch the log files.  I'm using the universal forwarder (4.3) and &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;splunk clean eventdata -index _fishbucket&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;returns&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;ERROR: Cleaning eventdata is not supported on this version.&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;so I took a wild guess and this appears to have done the trick.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;rm -rf /opt/splunkforwarder/var/lib/splunk/fishbucket&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;And yes, I'm just setting this up, so I'm not concerned about losing any splunk data.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2012 13:31:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Reset-splunkforwarder-to-re-read-file-from-beginning/m-p/38775#M7168</guid>
      <dc:creator>glitchcowboy</dc:creator>
      <dc:date>2012-08-27T13:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Reset splunkforwarder to re-read file from beginning</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Reset-splunkforwarder-to-re-read-file-from-beginning/m-p/38776#M7169</link>
      <description>&lt;P&gt;Deleting the directory worked for me.  I tried running command to clear the index, but it didn't work.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Aug 2014 14:57:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Reset-splunkforwarder-to-re-read-file-from-beginning/m-p/38776#M7169</guid>
      <dc:creator>aferone</dc:creator>
      <dc:date>2014-08-21T14:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Reset splunkforwarder to re-read file from beginning</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Reset-splunkforwarder-to-re-read-file-from-beginning/m-p/38777#M7170</link>
      <description>&lt;P&gt;variant2: use another crcSalt&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;crcSalt=reIndexItAll
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 28 Apr 2018 06:25:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Reset-splunkforwarder-to-re-read-file-from-beginning/m-p/38777#M7170</guid>
      <dc:creator>serjandrosov</dc:creator>
      <dc:date>2018-04-28T06:25:27Z</dc:date>
    </item>
  </channel>
</rss>

