<?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: Forwarder only reads file if i save it, ignores when script saves it in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Forwarder-only-reads-file-if-i-save-it-ignores-when-script-saves/m-p/486333#M83262</link>
    <description>&lt;P&gt;Hello @LAcioffi ,&lt;/P&gt;

&lt;P&gt;this can be a problem with CRC calculation, so splunk doesn't notice that the file has been changed. This especially the case if the file has large header or/and is too small.&lt;/P&gt;

&lt;P&gt;Run this command on the UF and compare the output after the file has been changed by the script:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;./splunk _internal call /services/admin/inputstatus/TailingProcessor:FileStatus
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if you see that this command reports wrong status and size, then you need to change crcSalt or initCrcLength in your inputs.conf&lt;/P&gt;

&lt;P&gt;Please let me know if it worked for you&lt;/P&gt;</description>
    <pubDate>Mon, 04 May 2020 13:49:39 GMT</pubDate>
    <dc:creator>PavelP</dc:creator>
    <dc:date>2020-05-04T13:49:39Z</dc:date>
    <item>
      <title>Forwarder only reads file if i save it, ignores when script saves it</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forwarder-only-reads-file-if-i-save-it-ignores-when-script-saves/m-p/486332#M83261</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;

&lt;P&gt;I have Splunk Universal Forwarder running on a server watching a few files for changes. Log data is inserted at the end of the files every 5 minutes or so.&lt;BR /&gt;
Up until a few days ago, all files were working and being correctly monitored. Today i noticed that a single file out of 10+ is not being monitored correctly.&lt;/P&gt;

&lt;P&gt;When the script appends something to the file and closes it (thus updating the update date), the data doesn't arrive at the index. However, if i open the file, change anything and save it, all the data that should have arrived suddenly arrives.&lt;/P&gt;

&lt;P&gt;This problem started out of the blue. I tried restarting the universal forwarder service, changing how the file is saved, deleting the file and letting the script re-create it, everything, but it still won't work.&lt;/P&gt;

&lt;P&gt;Any ideas? Has this ever happened to anyone before?&lt;/P&gt;

&lt;P&gt;P.S.: The file is open and closed explictly in my script. All other files do the same thing and work, only this one file is giving me trouble.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 13:31:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forwarder-only-reads-file-if-i-save-it-ignores-when-script-saves/m-p/486332#M83261</guid>
      <dc:creator>LAcioffi</dc:creator>
      <dc:date>2020-05-04T13:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Forwarder only reads file if i save it, ignores when script saves it</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forwarder-only-reads-file-if-i-save-it-ignores-when-script-saves/m-p/486333#M83262</link>
      <description>&lt;P&gt;Hello @LAcioffi ,&lt;/P&gt;

&lt;P&gt;this can be a problem with CRC calculation, so splunk doesn't notice that the file has been changed. This especially the case if the file has large header or/and is too small.&lt;/P&gt;

&lt;P&gt;Run this command on the UF and compare the output after the file has been changed by the script:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;./splunk _internal call /services/admin/inputstatus/TailingProcessor:FileStatus
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if you see that this command reports wrong status and size, then you need to change crcSalt or initCrcLength in your inputs.conf&lt;/P&gt;

&lt;P&gt;Please let me know if it worked for you&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 13:49:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forwarder-only-reads-file-if-i-save-it-ignores-when-script-saves/m-p/486333#M83262</guid>
      <dc:creator>PavelP</dc:creator>
      <dc:date>2020-05-04T13:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Forwarder only reads file if i save it, ignores when script saves it</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forwarder-only-reads-file-if-i-save-it-ignores-when-script-saves/m-p/486334#M83263</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;

&lt;P&gt;I don't have permissions to do that, but i checked the forwarder logs and the admin checked for error logs on index=_internal and we didn't find anything.&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 14:19:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forwarder-only-reads-file-if-i-save-it-ignores-when-script-saves/m-p/486334#M83263</guid>
      <dc:creator>LAcioffi</dc:creator>
      <dc:date>2020-05-04T14:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Forwarder only reads file if i save it, ignores when script saves it</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forwarder-only-reads-file-if-i-save-it-ignores-when-script-saves/m-p/486335#M83264</link>
      <description>&lt;P&gt;Hello @LAcioffi&lt;/P&gt;

&lt;P&gt;there are no errors in such situations.&lt;/P&gt;

&lt;P&gt;Can you post a redacted file?&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 14:55:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forwarder-only-reads-file-if-i-save-it-ignores-when-script-saves/m-p/486335#M83264</guid>
      <dc:creator>PavelP</dc:creator>
      <dc:date>2020-05-04T14:55:17Z</dc:date>
    </item>
  </channel>
</rss>

