Skip to content
share library_books

Tail Multiple Log Files

Input Plugin: File

Plugin to tail logs from files. A list of glob patterns is interpreted to generate the list of files, watched for changes. The file input plugin detects new files matching the glob patterns. The file input plugin behaves like the "tail -f" Linux command and reads files from the end of the file.

In addition, the last read file position is stored in the configured disk buffer directory 'diskBufferDir' when Logagent terminates. File positions are recovered when Logagent starts again.


diskBufferDir: /tmp
    - '/var/log/**/*.log'
    - '/opt/myapp/**/*.log'
    - '/opt/another-log-directory/another.log'

  stdout: yaml
    module: elasticsearch
    url: http://localhost:9200
    index: logs

Start Logagent

logagent --config myconfig.yml