<?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 stop reads monitored logs after restart in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Forwarder-stop-reads-monitored-logs-after-restart/m-p/453467#M78552</link>
    <description>&lt;P&gt;We had similar issues with a unix forwarder. I has to monitor over a million of files. It stopped sending logfiles and had high CPU consumption. I assume you are struggling with the same issue as we did. &lt;/P&gt;

&lt;P&gt;The UF doesnt like haveing lots of open files like you configured with &lt;CODE&gt;alwaysOpenfile=1&lt;/CODE&gt; Even if you get rid of this option I doubt that the UF will work. &lt;/P&gt;

&lt;P&gt;Try using the &lt;CODE&gt;batch://&lt;/CODE&gt;option. It reads and deletes the file. if you dont want to delete the file on your server I suggest, that you write a script in which the files are copied to a temporary directory. &lt;/P&gt;

&lt;P&gt;In the end you will have configuration like this (inputs.conf):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[batch://c:\FirstFolder\Log\service\System\20*\PROXY\...]
disabled = false 
index=my_index 
sourcetype=proxy 
move_policy = sinkhole
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 22 Feb 2019 13:47:08 GMT</pubDate>
    <dc:creator>markusspitzli</dc:creator>
    <dc:date>2019-02-22T13:47:08Z</dc:date>
    <item>
      <title>Forwarder stop reads monitored logs after restart</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forwarder-stop-reads-monitored-logs-after-restart/m-p/453466#M78551</link>
      <description>&lt;P&gt;Hi to all,&lt;/P&gt;

&lt;P&gt;I have several Forwarders on Windows that monitor more than 20k items each (folder and logs inside them).&lt;BR /&gt;
In total I'm monitoring more than 200k logs.&lt;/P&gt;

&lt;P&gt;This is my inputs.conf deployed on those forwarders:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://c:\FirstFolder\Log\service\System\20*\PROXY\...] 
disabled = false 
index=my_index 
sourcetype=proxy 
alwaysOpenFile=1

[monitor://c:\\FirstFolder\Log\service\System\20*\00*\*.log] 
disabled = false 
index=my_index 
sourcetype=process 
alwaysOpenFile=1

[monitor://c:\\FirstFolder\Log\service\System\20*\00*.log] 
disabled = false 
index=my_index 
sourcetype=device
alwaysOpenFile=1

[monitor://c:\\FirstFolder\Log\service\System\20*\ERROR_*.log] 
disabled = false 
index=main 
sourcetype=error 
alwaysOpenFile=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I restart the forwarders, they does not monitor anymore the files that the forwarders read before, even if the log files will be written after the restart.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2018 13:41:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forwarder-stop-reads-monitored-logs-after-restart/m-p/453466#M78551</guid>
      <dc:creator>robertosegantin</dc:creator>
      <dc:date>2018-10-26T13:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: Forwarder stop reads monitored logs after restart</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forwarder-stop-reads-monitored-logs-after-restart/m-p/453467#M78552</link>
      <description>&lt;P&gt;We had similar issues with a unix forwarder. I has to monitor over a million of files. It stopped sending logfiles and had high CPU consumption. I assume you are struggling with the same issue as we did. &lt;/P&gt;

&lt;P&gt;The UF doesnt like haveing lots of open files like you configured with &lt;CODE&gt;alwaysOpenfile=1&lt;/CODE&gt; Even if you get rid of this option I doubt that the UF will work. &lt;/P&gt;

&lt;P&gt;Try using the &lt;CODE&gt;batch://&lt;/CODE&gt;option. It reads and deletes the file. if you dont want to delete the file on your server I suggest, that you write a script in which the files are copied to a temporary directory. &lt;/P&gt;

&lt;P&gt;In the end you will have configuration like this (inputs.conf):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[batch://c:\FirstFolder\Log\service\System\20*\PROXY\...]
disabled = false 
index=my_index 
sourcetype=proxy 
move_policy = sinkhole
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Feb 2019 13:47:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forwarder-stop-reads-monitored-logs-after-restart/m-p/453467#M78552</guid>
      <dc:creator>markusspitzli</dc:creator>
      <dc:date>2019-02-22T13:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Forwarder stop reads monitored logs after restart</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forwarder-stop-reads-monitored-logs-after-restart/m-p/453468#M78553</link>
      <description>&lt;P&gt;Hi @robertosegantin ,&lt;/P&gt;

&lt;P&gt;Did you try cheking splunk internal logs? Are der any ERRORS in log_level?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Feb 2019 15:38:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forwarder-stop-reads-monitored-logs-after-restart/m-p/453468#M78553</guid>
      <dc:creator>vinod94</dc:creator>
      <dc:date>2019-02-22T15:38:53Z</dc:date>
    </item>
  </channel>
</rss>

