Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Collector cant handle File deletions #77

@gruselglatz

Description

@gruselglatz

Hi,

we have a Logfile from an very complicated system, so we collect it via the collector:

It is filled live, and every hour it gets deleted and a new file will be created, it looks like this:

/mnt/log/work-grnti_201601080900
/mnt/log/work-grnti_201601081000
.
.
.

so i created this input for the collector:

inputs {
  local-syslog {
    type = "file"
    path-glob-root = "/mnt/log"
    path-glob-pattern = "work*"
    message-fields = {
      "application_name" = "test"
    }
    charset = "utf-8"
    content-splitter = "newline"
  }
}

And after "rotation" i get this error and the collector STOPS working and is only spamming my log!

2016-01-08T10:03:01.161+0100 WARN  [chunkreader-scheduler-thread-local-syslog-0] collector.file.ChunkReader - [/mnt/log/work-grnti_201601080900] I/O error
java.io.IOException: No such file or directory
        at sun.nio.ch.FileDispatcherImpl.size0(Native Method) ~[?:1.7.0_91]
        at sun.nio.ch.FileDispatcherImpl.size(FileDispatcherImpl.java:85) ~[?:1.7.0_91]
        at sun.nio.ch.SimpleAsynchronousFileChannelImpl.size(SimpleAsynchronousFileChannelImpl.java:114) ~[?:1.7.0_91]
        at org.graylog.collector.file.ChunkReader.run(ChunkReader.java:132) [graylog-collector.jar:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [?:1.7.0_91]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) [?:1.7.0_91]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) [?:1.7.0_91]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.7.0_91]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_91]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_91]

At the moment i work around with a crontab which restarts my collector every hour.

Thx for help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions