files
Read from multiple files, in order of creation
Example
action:
files:
path: /var/log/dpkg.*
Field Name | Description | Type | Default |
---|---|---|---|
path | A path with wildcards identifying files to be read | path | - |
data-dir | The directory where checkpoints are written | path | the data directory for this user (e.g ~/.local/share/hotrod/PIPENAME on Linux) |
encoding | The text encoding for the monitored files | encoding | UTF-8 |
include | Any other paths to be included | array of paths | - |
exclude | Paths to be excluded | array of paths | - |
ignore-older-than | Ignore files older than this (epoch time in seconds) | integer | - |
glob-minimum-cooldown | Pause after scanning for new files (in milliseconds) | integer | 300ms |
stop-reading-after | Do not wait for new files | bool | false |
ignore-line-breaks | Consume each file as one event | bool | false |
remove-after | Remove files that are done reading after this period (seconds) | integer | - |
fingerprinting | File fingerprinting strategy | Fingerprinter | DevInode |
oldest-first | Default is youngest first | bool | false |
file-path-field | Fill this field with the field we are currently reading from | field | - |
file-basename | The file-path-field path will be the basename (e.g. '/path/frodo.txt' becomes just 'frodo') | bool | false |
start-at-beginning | Ignore stored checkpoints and re-read all specified files | bool | false |
raw | Disable 'quoting' of lines with _raw | bool | false |
max-read-size | Will not attempt to read files larger than this | integer | 100MB |
max-line-size | Will not attempt to read lines longer than this | integer | 1MB |
path
A path with wildcards identifying files to be read
Type: path
data-dir
The directory where checkpoints are written
Type: path
encoding
The text encoding for the monitored files
Type: encoding
include
Any other paths to be included
Type: array of paths
exclude
Paths to be excluded
Type: array of paths
ignore-older-than
Ignore files older than this (epoch time in seconds)
Type: integer
glob-minimum-cooldown
Pause after scanning for new files (in milliseconds)
Type: integer
stop-reading-after
Do not wait for new files
Available from Hotrod: 2.8
Type: bool
ignore-line-breaks
Consume each file as one event
Available from Hotrod: 2.8
Type: bool
remove-after
Remove files that are done reading after this period (seconds)
Type: integer
fingerprinting
File fingerprinting strategy
Type: Fingerprinter
Field Name | Description | Type | Default |
---|---|---|---|
checksum | Fingerprint strategy is set to a checksum of the start of the file determined by the bytes that are skipped (ignored-header-bytes ) and then the fingerprint size in bytes | FingerprinterChecksum | - |
first-line-checksum | Fingerprint strategy that uses the first line of the file to detect if a file has changed | FingerprinterFirstLineChecksum | - |
dev-inode | Fingerprint strategy is set to the inode of the file causing the file monitor to detect new files when a file is recreated | FingerprinterDevInode | - |
checksum
Fingerprint strategy is set to a checksum of the start of the file determined by the bytes that are skipped (ignored-header-bytes
) and then the fingerprint size in bytes
Type: FingerprinterChecksum
Field Name | Description | Type | Default |
---|---|---|---|
fingerprint-bytes | The number of bytes to use for the fingerprint, starts after ignore-header-bytes if specified | integer | - |
ignored-header-bytes | The number of bytes from the start of the file to ignore before starting the fingerprint | integer | - |
fingerprint-bytes
The number of bytes to use for the fingerprint, starts after ignore-header-bytes
if specified
Type: integer
ignored-header-bytes
The number of bytes from the start of the file to ignore before starting the fingerprint
Type: integer
first-line-checksum
Fingerprint strategy that uses the first line of the file to detect if a file has changed
Type: FingerprinterFirstLineChecksum
Field Name | Description | Type | Default |
---|---|---|---|
max-line-length | The maximum number of bytes to read from the first line of the file to calculate the fingerprint | integer | - |
max-line-length
The maximum number of bytes to read from the first line of the file to calculate the fingerprint
Type: integer
dev-inode
Fingerprint strategy is set to the inode of the file causing the file monitor to detect new files when a file is recreated
Type: FingerprinterDevInode
oldest-first
Default is youngest first
Type: bool
file-path-field
Fill this field with the field we are currently reading from
Type: field
file-basename
The file-path-field
path will be the basename (e.g. '/path/frodo.txt' becomes just 'frodo')
Available from Hotrod: 2.8
Type: bool
start-at-beginning
Ignore stored checkpoints and re-read all specified files
Type: bool
raw
Disable 'quoting' of lines with _raw
Type: bool
max-read-size
Will not attempt to read files larger than this
Type: integer
max-line-size
Will not attempt to read lines longer than this
Type: integer