<?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 Ingesting files with updated first line in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-files-with-updated-first-line/m-p/393031#M70204</link>
    <description>&lt;P&gt;I got a file which get new log entries during the day, when a user logs out, the first line of the log is updated with the timestamp of the last event. New crc check will say this is a new file and will reingest, I'm aware that i can turn that off, so the file won't be reindexed, but the updated line (the first line of the logfile) should be ingested again as a new event.&lt;/P&gt;

&lt;P&gt;For example at the beginning the file looks like this&lt;/P&gt;

&lt;P&gt;2018-06-15 11:32 728638327652 INFO Log file opened Log file finished XXXX-XX-XX XX:XX some additional info&lt;BR /&gt;
2018-06-15 11:32 728638327652 INFO Log line 2 some additional info&lt;BR /&gt;
2018-06-15 11:32 728638327652 INFO Log line 3 some additional info&lt;BR /&gt;
2018-06-15 11:32 728638327652 INFO Log line 4 some additional info&lt;BR /&gt;
....&lt;/P&gt;

&lt;P&gt;Then at the end of a session the following happens&lt;/P&gt;

&lt;P&gt;2018-06-15 11:32 728638327652 INFO Log file opened Log file finished 2018-06-15 11:36 some additional info&lt;BR /&gt;
2018-06-15 11:32 728638327652 INFO Log line 2 some additional info&lt;BR /&gt;
2018-06-15 11:32 728638327652 INFO Log line 3 some additional info&lt;BR /&gt;
2018-06-15 11:32 728638327652 INFO Log line 4 some additional info&lt;BR /&gt;
...&lt;BR /&gt;
2018-06-15 11:36 728638327652 INFO Log line 86 some additional info&lt;BR /&gt;
2018-06-15 11:36 728638327652 INFO Log line 87 some additional info&lt;BR /&gt;
2018-06-15 11:36 728638327652 INFO Log line 88 last line of the log file&lt;/P&gt;

&lt;P&gt;I am aware that I can solve this in SPL&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;In case of double ingestion by dedupping&lt;/LI&gt;
&lt;LI&gt;In case of ingesting the file without an updated first event by | eventstats latest(_time) by sessionid&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;But we're going to query this very often and the preferred solution is index all lines when written to file and after the first line is updated, index the first line again.&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jun 2018 09:43:11 GMT</pubDate>
    <dc:creator>erikgrasman</dc:creator>
    <dc:date>2018-06-15T09:43:11Z</dc:date>
    <item>
      <title>Ingesting files with updated first line</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-files-with-updated-first-line/m-p/393031#M70204</link>
      <description>&lt;P&gt;I got a file which get new log entries during the day, when a user logs out, the first line of the log is updated with the timestamp of the last event. New crc check will say this is a new file and will reingest, I'm aware that i can turn that off, so the file won't be reindexed, but the updated line (the first line of the logfile) should be ingested again as a new event.&lt;/P&gt;

&lt;P&gt;For example at the beginning the file looks like this&lt;/P&gt;

&lt;P&gt;2018-06-15 11:32 728638327652 INFO Log file opened Log file finished XXXX-XX-XX XX:XX some additional info&lt;BR /&gt;
2018-06-15 11:32 728638327652 INFO Log line 2 some additional info&lt;BR /&gt;
2018-06-15 11:32 728638327652 INFO Log line 3 some additional info&lt;BR /&gt;
2018-06-15 11:32 728638327652 INFO Log line 4 some additional info&lt;BR /&gt;
....&lt;/P&gt;

&lt;P&gt;Then at the end of a session the following happens&lt;/P&gt;

&lt;P&gt;2018-06-15 11:32 728638327652 INFO Log file opened Log file finished 2018-06-15 11:36 some additional info&lt;BR /&gt;
2018-06-15 11:32 728638327652 INFO Log line 2 some additional info&lt;BR /&gt;
2018-06-15 11:32 728638327652 INFO Log line 3 some additional info&lt;BR /&gt;
2018-06-15 11:32 728638327652 INFO Log line 4 some additional info&lt;BR /&gt;
...&lt;BR /&gt;
2018-06-15 11:36 728638327652 INFO Log line 86 some additional info&lt;BR /&gt;
2018-06-15 11:36 728638327652 INFO Log line 87 some additional info&lt;BR /&gt;
2018-06-15 11:36 728638327652 INFO Log line 88 last line of the log file&lt;/P&gt;

&lt;P&gt;I am aware that I can solve this in SPL&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;In case of double ingestion by dedupping&lt;/LI&gt;
&lt;LI&gt;In case of ingesting the file without an updated first event by | eventstats latest(_time) by sessionid&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;But we're going to query this very often and the preferred solution is index all lines when written to file and after the first line is updated, index the first line again.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 09:43:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingesting-files-with-updated-first-line/m-p/393031#M70204</guid>
      <dc:creator>erikgrasman</dc:creator>
      <dc:date>2018-06-15T09:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting files with updated first line</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-files-with-updated-first-line/m-p/393032#M70205</link>
      <description>&lt;P&gt;Splunk either indexes the entire file each time it changes or it indexes new lines.  There is no option to re-index parts of a file.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 13:22:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingesting-files-with-updated-first-line/m-p/393032#M70205</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-06-15T13:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting files with updated first line</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-files-with-updated-first-line/m-p/393033#M70206</link>
      <description>&lt;P&gt;It's an odd type of logging that you do. Do you have control over how logging is done? Can you change it to log the timestamp change (for "opened Log file..") to the end of the time along with new lines to be added?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 15:13:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingesting-files-with-updated-first-line/m-p/393033#M70206</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-06-15T15:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting files with updated first line</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-files-with-updated-first-line/m-p/393034#M70207</link>
      <description>&lt;P&gt;odd... at least indeed&lt;/P&gt;

&lt;P&gt;I don't think we got very much control over the guys who are creating the logging, it's a company called oracle &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.oracle.com/cd/E14004_01/books/OIRef/Using_Siebel_VB_and_Siebel_eScript10.html"&gt;https://docs.oracle.com/cd/E14004_01/books/OIRef/Using_Siebel_VB_and_Siebel_eScript10.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 15:37:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingesting-files-with-updated-first-line/m-p/393034#M70207</guid>
      <dc:creator>erikgrasman</dc:creator>
      <dc:date>2018-06-15T15:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting files with updated first line</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-files-with-updated-first-line/m-p/393035#M70208</link>
      <description>&lt;P&gt;Discussed this with Splunk Support / Development. Currently there is no out of the box solution (like a crc offset which starts after x amount of characters).&lt;BR /&gt;
1&lt;BR /&gt;
Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jun 2018 06:27:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingesting-files-with-updated-first-line/m-p/393035#M70208</guid>
      <dc:creator>erikgrasman</dc:creator>
      <dc:date>2018-06-28T06:27:59Z</dc:date>
    </item>
  </channel>
</rss>

