<?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: is there a way to tail a file to index any new changes? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/is-there-a-way-to-tail-a-file-to-index-any-new-changes/m-p/10879#M436</link>
    <description>&lt;P&gt;Yes, the followTail setting tells Splunk to index only new events in a monitored file:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
  &lt;P&gt;followTail = 0|1&lt;/P&gt;
  
  &lt;UL&gt;
  &lt;LI&gt;If set to 1, monitoring begins at
  the end of the file (like tail -f).   &lt;/LI&gt;
  &lt;LI&gt;This only applies to files the first time they are picked up.    * After
  that, Splunk's internal file position
  records keep track of the file.&lt;/LI&gt;
  &lt;/UL&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/base/Documentation/4.0.10/Admin/Monitorfilesanddirectories#Monitor_syntax_and_examples" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/4.0.10/Admin/Monitorfilesanddirectories#Monitor_syntax_and_examples&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Apr 2010 00:11:30 GMT</pubDate>
    <dc:creator>the_wolverine</dc:creator>
    <dc:date>2010-04-05T00:11:30Z</dc:date>
    <item>
      <title>is there a way to tail a file to index any new changes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/is-there-a-way-to-tail-a-file-to-index-any-new-changes/m-p/10878#M435</link>
      <description>&lt;P&gt;I let splunk monitor a directory of files. I found when any file got changed splunk will reindex all events in the file, not just the new lines added.
Is there a way to "tail" those files so splunk will reindex/import only the new lines instead of reloading all event in the files?&lt;/P&gt;</description>
      <pubDate>Sun, 04 Apr 2010 23:08:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/is-there-a-way-to-tail-a-file-to-index-any-new-changes/m-p/10878#M435</guid>
      <dc:creator>tantingli</dc:creator>
      <dc:date>2010-04-04T23:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way to tail a file to index any new changes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/is-there-a-way-to-tail-a-file-to-index-any-new-changes/m-p/10879#M436</link>
      <description>&lt;P&gt;Yes, the followTail setting tells Splunk to index only new events in a monitored file:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
  &lt;P&gt;followTail = 0|1&lt;/P&gt;
  
  &lt;UL&gt;
  &lt;LI&gt;If set to 1, monitoring begins at
  the end of the file (like tail -f).   &lt;/LI&gt;
  &lt;LI&gt;This only applies to files the first time they are picked up.    * After
  that, Splunk's internal file position
  records keep track of the file.&lt;/LI&gt;
  &lt;/UL&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/base/Documentation/4.0.10/Admin/Monitorfilesanddirectories#Monitor_syntax_and_examples" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/4.0.10/Admin/Monitorfilesanddirectories#Monitor_syntax_and_examples&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Apr 2010 00:11:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/is-there-a-way-to-tail-a-file-to-index-any-new-changes/m-p/10879#M436</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2010-04-05T00:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way to tail a file to index any new changes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/is-there-a-way-to-tail-a-file-to-index-any-new-changes/m-p/10880#M437</link>
      <description>&lt;P&gt;Thanks! I tried it and it works for tailing the file.&lt;BR /&gt;
But I found two problems:&lt;BR /&gt;
1. say if I have 1.log in the directory. adding new lines works fine. but if I overwrite the existing content with new events then it won't get import/indexed. &lt;BR /&gt;
2. if I copy another file to this directory called 2.log. That file won't get picked up automatically.&lt;/P&gt;

&lt;P&gt;These 2 problems were not there without followTail=1.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Apr 2010 00:36:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/is-there-a-way-to-tail-a-file-to-index-any-new-changes/m-p/10880#M437</guid>
      <dc:creator>tantingli</dc:creator>
      <dc:date>2010-04-05T00:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way to tail a file to index any new changes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/is-there-a-way-to-tail-a-file-to-index-any-new-changes/m-p/10881#M438</link>
      <description>&lt;P&gt;I found a solution:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///LOGS/dtjlogs]
disabled = false
host =
host_regex =
host_segment = 3
index = default
sourcetype =

[monitor:///LOGS/dtjlogs/*/*.log]
disabled = false
host =
host_regex =
host_segment = 3
index = default
sourcetype =
followTail = 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;actually the two [monitor] are monitoring same files
The only difference is the followTail=1
I found if I name the two monitor the same, only the first stanza works
So just work-around by naming them slightly different.
Now any new files will be picked up by the followTail=0 stanza
and appended(tailing) events will be picked up by followTail=1 stanza.
Ha, what a solution.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Apr 2010 02:26:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/is-there-a-way-to-tail-a-file-to-index-any-new-changes/m-p/10881#M438</guid>
      <dc:creator>tantingli</dc:creator>
      <dc:date>2010-04-05T02:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way to tail a file to index any new changes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/is-there-a-way-to-tail-a-file-to-index-any-new-changes/m-p/10882#M439</link>
      <description>&lt;P&gt;Don't rely too much on this.  The behavior for overlapping inputs like this is not well explored in 4.0.  I suspect just the followtail stanza is needed, but you may not have been testing the file modification in a realistic way.  &lt;/P&gt;

&lt;P&gt;Be sure to replace the contents with new contents, rather than modifying a few lines in the middle.  Also in 4.0, be prepared to be somewhat patient.  In 4.1, the requirement for patience is much reduced.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2010 03:45:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/is-there-a-way-to-tail-a-file-to-index-any-new-changes/m-p/10882#M439</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2010-04-06T03:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way to tail a file to index any new changes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/is-there-a-way-to-tail-a-file-to-index-any-new-changes/m-p/10883#M440</link>
      <description>&lt;P&gt;In 4.1, overlapping stanzas are supported, in this case, the .log files in subdirectories are handled by the second stanza, while the other files are handled by the first.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2010 03:45:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/is-there-a-way-to-tail-a-file-to-index-any-new-changes/m-p/10883#M440</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2010-04-06T03:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way to tail a file to index any new changes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/is-there-a-way-to-tail-a-file-to-index-any-new-changes/m-p/10884#M441</link>
      <description>&lt;P&gt;From my testing, it looks like followTail is working.  Files in subdirectories of the configured monitor input directory are properly recognized when   If it is not working for you, please submit a ticket to support and provide your test case.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2010 06:16:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/is-there-a-way-to-tail-a-file-to-index-any-new-changes/m-p/10884#M441</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2010-04-08T06:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way to tail a file to index any new changes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/is-there-a-way-to-tail-a-file-to-index-any-new-changes/m-p/10885#M442</link>
      <description>&lt;P&gt;Agree with Tina, problem 1 is not known, and probably does not occur.  When manually testing monitor behavior, it's easy to not trigger reindexing, because splunk looks for the behavior of real logging programs (the whole file is changed, not just portions).&lt;/P&gt;

&lt;P&gt;Problem 2 is known.  Followtail's implementation assumes that you roll existing files rather than add new ones.  You could use followtail on specific individual file paths to avoid this problem.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Apr 2010 08:47:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/is-there-a-way-to-tail-a-file-to-index-any-new-changes/m-p/10885#M442</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2010-04-17T08:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way to tail a file to index any new changes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/is-there-a-way-to-tail-a-file-to-index-any-new-changes/m-p/10886#M443</link>
      <description>&lt;P&gt;Can you please consider modifying this question to clarify either what you were trying to do, or to inquire about the strange behavior you saw?  The goal is for these to be informative to others.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Apr 2010 08:49:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/is-there-a-way-to-tail-a-file-to-index-any-new-changes/m-p/10886#M443</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2010-04-17T08:49:09Z</dc:date>
    </item>
  </channel>
</rss>

