Skip to main content

fsevent

EXPERIMENTAL

This component is experimental and therefore subject to change or removal outside of major version releases.

Detects filesystem events. Emits empty messages with metadata describing the event

# Config fields, showing default values
input:
label: ""
fsevent:
paths: [] # No default (required)
is_recursive: false
watch_new_subdirs: false
extensions: []

Metadata

This input adds the following metadata fields to each message:

- fsevent_path
- fsevent_operation
- fsevent_mod_time_unix
- fsevent_mod_time (RFC3339)
- fsevent_is_dir

You can access these metadata fields using function interpolation.

OperationCause
CREATEA new pathname was created.
WRITEThe pathname was written to; this does not mean the write has finished, and a write can be followed by more writes.
REMOVEThe path was removed; any watches on it will be removed. Some "remove" operations may trigger a RENAME if the file is actually moved (for example "remove to trash" is often a rename).
RENAMEThe path was renamed to something else. Any watches on it will be removed.
CHMODFile attributes were changed. It's generally not recommended to take action on this event, as it may get triggered very frequently by some software. For example, Spotlight indexing on macOS, anti-virus software, backup software, etc.

Fields

paths

A list of paths to monitor for file changes.

Type: array

is_recursive

If set, subdirs of configured paths will be watched too.

Type: bool
Default: false

watch_new_subdirs

If set, events from subdirs created after the input is started, will also be watched.

Type: bool
Default: false

extensions

An optional list of file extensions to filter events for (e.g. [".txt", ".log"]). If empty, events for all files are emitted.

Type: array
Default: []