Skip to content

Reads data from files and moves files from input to done dirs

Notifications You must be signed in to change notification settings

JasperW01/logstash-input-scafile

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

<title>logstash for SCAPI - input scafile</title>

scafile

Milestone: 1

Synopsis

Reads files from a specified directory in a sorted order, emits each line in each file as an event. When all the lines in the file have been processed, the file is moved to a 'done' directory. This approach suits a lot of SCAPI mediation use cases where data is delivered in a series of files - files which do not change once delivered (in contrast with growing and rotating 'log' files).

input {
  scafile {
    path => ... # string (required)
    done_dir => ... # string (required)
    ready_file => ... # string (optional), default: ""
    poll_interval => ... # number (optional), default: 10
    }
 }

Details

This input scan the specified path every poll_interval seconds. Any files found are processed in lexical-sort order and the contents of each file emitted as a stream of Logstash events. Once the file contents have been read, each file is closed and moved to the directory specified in done_dir

  • Value type is String
  • There is no default for this setting

Path to a directory where input files are to be found . File wildcards(Ruby glob syntax used) are acceptable.

  • Value type is String
  • There is no default for this setting

Directory where processed files are moved to.

  • Value type is String
  • The default value is ""

If this string has value, that value should be the full pathname to a file, which will be used as a token file. When scafile finds this token file, it will delete it, and then process the files in the directory in the normal way. If the string is empty, then files are processed normally. The presence or absence of such a token file can be used to control when file occurs. For example, you can keep moving files into the directory, but they will only be picked up if the token file is present.

  • Value type is Number
  • The default value is 10

The number of seconds to wait between successive scan of the directory for files.


Hello! I'm your friendly footer. If you're actually reading this, I'm impressed.

<script src="/js/patch.js?1.4.2"></script>

About

Reads data from files and moves files from input to done dirs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%