On this Page
MetricsHub
MetricsHub Community Connectors 1.0.22
-
Home
- Connector Developer Guide Sources 19
file (Source)
When To Use
Use file to ingest file contents directly when available in your runtime version.
Typical intent:
- Tail-style log ingestion.
- Reading rotating files with wildcard paths.
- Full-file polling for small structured files.
Syntax
sources:
appLogs:
type: file
paths:
- /var/log/myapp/*.log
mode: LOG
maxSizePerPoll: 5MB
Properties
| Property | Required | Default | Description |
|---|---|---|---|
type |
Yes | None | file. |
paths |
Yes | None | File path patterns to read. |
mode |
No | LOG |
LOG (cursor/incremental) or FLAT (read full file each cycle). |
maxSizePerPoll |
No | 5242880 |
Max bytes read per cycle (-1 for unlimited). |
executeForEachEntryOf |
No | None | Fan-out execution context. |
computes |
No | [] |
Post-processing computes. |
forceSerialization |
No | false |
Serialize execution via a per-connector, per-host lock (see the Sources overview). Default false. |
Recommended Pattern
- Prefer
LOGmode for real log files. - Keep
maxSizePerPollbounded to avoid long polling delays. - Normalize lines with computes before mapping.
Common Mistakes
- Using
FLATmode on large files. - Very broad wildcards that match too many files.
- Mapping raw unparsed text without stable separators.
Examples
No current community connector uses file.
Caution
file is present in the official JSON schema, but usage is currently absent in community connectors. Validate behavior against your MetricsHub runtime version before adopting it.
file source
log files
schema compatibility
metricshub
community
connector
hardware
system
Search Results for {{siteSearch | truncate:'50'}}
{{resultArray.length}}
Searching...
No results.
