fstab / grok_exporter

Export Prometheus metrics from arbitrary unstructured log data.
Apache License 2.0
891 stars 152 forks source link

error reading log lines: error reading file system events: failed to read inotify events: interrupted system call #164

Open hansellb opened 2 years ago

hansellb commented 2 years ago

Hello @fstab

I have a Spring based application that uses log4j2 to write log files using an appender like this one:

<RollingRandomAccessFile append="true"
                                            name="StatusLogService"
                                            fileName="./Status.log"
                                            filePattern="./Status.log.%d{yyyy-MM-dd-HH}">
  <PatternLayout>
    <Pattern>%-5p %m%n</Pattern>
  </PatternLayout>
  <Policies>
    <TimeBasedTriggeringPolicy interval="1" />
  </Policies>
</RollingRandomAccessFile>

After starting grok_exporter with readall: false I could briefly poll the metrics, however, after a few seconds the exporter stopped and the log showed error reading log lines: error reading file system events: failed to read inotify events: interrupted system call

I understand that someone had a similar problem on Windows (issue #17), which was solved after you implemented the poll_interval property. However, I am using RedHat Linux 6

I was wondering if there is something I have do to on my end, or if should use the poll_interval property. Moreover, if I use this property, will the log rollover be detected?

Thanks

mad-ady commented 2 years ago

I can confirm that grok_exporter works fine on RHEL6 with poll_interval set. The problem must be due to the old kernel used (2.6.x)