addMetadata¶
Turns metadata addition on or off; enabled by default when wildcards are used.
This parameter applies to imfile: Text File Input Module.
- Name:
addMetadata
- Scope:
input
- Type:
boolean
- Default:
auto (on with wildcards)
- Required?:
no
- Introduced:
at least 8.x, possibly earlier
Description¶
Used to control whether file metadata is added to the message object. By
default it is enabled for input() statements that contain wildcards and
disabled otherwise. This parameter overrides the default behavior.
When metadata is enabled, imfile adds these fields below $!metadata:
filename: the monitored file name, or the symlink name when the input matched a symlink.fileoffset: the byte offset at which the submitted record starts.line_number: the 1-based line or record number for the monitored file. The value is persisted in the imfile state file and continues across restarts when state is available.
Input usage¶
input(type="imfile"
File="/var/log/example.log"
Tag="example"
addMetadata="on")
Notes¶
Legacy documentation used the term
binaryfor the type. It is treated as boolean.
See also¶
See also imfile: Text File Input Module.
Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project
Contributing: Source & docs: rsyslog source project
© 2008–2026 Rainer Gerhards and others. Licensed under the Apache License 2.0.