<?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 detect that a file has been indexed in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-that-a-file-has-been-indexed/m-p/131539#M27050</link>
    <description>&lt;P&gt;Hi JeremyHagan,&lt;/P&gt;

&lt;P&gt;you can use the REST end point&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; /services/admin/inputstatus/TailingProcessor:FileStatus
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to track if a universal forwarder is reading files monitored or completed sending events.&lt;BR /&gt;&lt;BR /&gt;
In the end point you can find information about "open file", and others showing "finished reading".&lt;/P&gt;

&lt;P&gt;Some details about the endpoint information, when the percent is 100% :&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;"finished reading"&lt;/CODE&gt; means that the file has been read and forwarded till the end.&lt;BR /&gt;&lt;BR /&gt;
&lt;CODE&gt;"open file"&lt;/CODE&gt; means the same, but in addition the handle on the file is still open (because it has been less than 3 seconds, or because it is being 'tailed', or the file has just being reopen for any update or rotation).&lt;/P&gt;

&lt;P&gt;Splunk will monitor every file, because Splunk assumes that a new event can be added to any file.&lt;/P&gt;

&lt;P&gt;hope this helps...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
    <pubDate>Thu, 07 Nov 2013 10:18:26 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2013-11-07T10:18:26Z</dc:date>
    <item>
      <title>How to detect that a file has been indexed</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-that-a-file-has-been-indexed/m-p/131536#M27047</link>
      <description>&lt;P&gt;I have an automated process running on a Windows server that has the Universal Forwarder installed. It drops files for indexing in a specific folder and I want it to be able to clean up and delete files that have been indexed.&lt;/P&gt;

&lt;P&gt;In my testing I found that the splunkd.log file had entries like this:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;11-06-2013 22:08:49.817 +1100 INFO &lt;BR /&gt;
BatchReader - Removed from queue&lt;BR /&gt;
file='U:\WebsenseExport\Exported\20131106100010.csv'.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;My script was parsing this file and if it found this entry it would delete the file. This morning I find a bunch of files have been indexed, but are not noted in the splunkd.log. I suspect that this is because they are small and the "BatchReader" doesn't handle them? This is just a guess.&lt;/P&gt;

&lt;P&gt;Is there a foolproof way I can tell, from the forwarder, that a file has definitely been indexed?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2013 21:56:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-that-a-file-has-been-indexed/m-p/131536#M27047</guid>
      <dc:creator>JeremyHagan</dc:creator>
      <dc:date>2013-11-06T21:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect that a file has been indexed</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-that-a-file-has-been-indexed/m-p/131537#M27048</link>
      <description>&lt;P&gt;you might check your Index where the data is indexed, with the source=yourfilename and see if any events are found there.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2013 22:05:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-that-a-file-has-been-indexed/m-p/131537#M27048</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2013-11-06T22:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect that a file has been indexed</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-that-a-file-has-been-indexed/m-p/131538#M27049</link>
      <description>&lt;P&gt;Thanks for the answer, but I need to be able to check from the forwarder and programmatically. &lt;/P&gt;

&lt;P&gt;Your suggestion would require access to the splunk indexer.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2013 22:11:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-that-a-file-has-been-indexed/m-p/131538#M27049</guid>
      <dc:creator>JeremyHagan</dc:creator>
      <dc:date>2013-11-06T22:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect that a file has been indexed</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-that-a-file-has-been-indexed/m-p/131539#M27050</link>
      <description>&lt;P&gt;Hi JeremyHagan,&lt;/P&gt;

&lt;P&gt;you can use the REST end point&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; /services/admin/inputstatus/TailingProcessor:FileStatus
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to track if a universal forwarder is reading files monitored or completed sending events.&lt;BR /&gt;&lt;BR /&gt;
In the end point you can find information about "open file", and others showing "finished reading".&lt;/P&gt;

&lt;P&gt;Some details about the endpoint information, when the percent is 100% :&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;"finished reading"&lt;/CODE&gt; means that the file has been read and forwarded till the end.&lt;BR /&gt;&lt;BR /&gt;
&lt;CODE&gt;"open file"&lt;/CODE&gt; means the same, but in addition the handle on the file is still open (because it has been less than 3 seconds, or because it is being 'tailed', or the file has just being reopen for any update or rotation).&lt;/P&gt;

&lt;P&gt;Splunk will monitor every file, because Splunk assumes that a new event can be added to any file.&lt;/P&gt;

&lt;P&gt;hope this helps...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2013 10:18:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-that-a-file-has-been-indexed/m-p/131539#M27050</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2013-11-07T10:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect that a file has been indexed</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-that-a-file-has-been-indexed/m-p/131540#M27051</link>
      <description>&lt;P&gt;I like the answer from @MuS&lt;/P&gt;

&lt;P&gt;To follow up, you might also take a look at this blog post. It's a bit old, but you can grab some code that does something like what you want...&lt;/P&gt;

&lt;P&gt;I love code samples&lt;/P&gt;

&lt;P&gt;&lt;A href="http://blogs.splunk.com/2011/01/02/did-i-miss-christmas-2/"&gt;http://blogs.splunk.com/2011/01/02/did-i-miss-christmas-2/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2013 00:09:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-that-a-file-has-been-indexed/m-p/131540#M27051</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-11-08T00:09:33Z</dc:date>
    </item>
  </channel>
</rss>

