Node-RED File Tail Node
raw JSON →The `node-red-node-tail` package provides a core Node-RED node designed to monitor and process changes in files on the local filesystem. It functions similarly to the `tail -f` command, continuously reading and injecting new lines appended to a specified file directly into a Node-RED flow. This enables real-time processing of log files, data streams, or any continuously updated text files within a Node-RED environment. The latest stable version, 0.4.0, was published over three years ago, indicating that this specific node is currently in a maintenance phase rather than active development. While part of the broader `node-red-nodes` collection, its release cadence is irregular, tied to Node-RED's own lifecycle or specific bug fixes rather than a frequent update schedule. Its primary differentiator is its seamless integration into the Node-RED visual programming paradigm, allowing users to configure file monitoring without writing any code, solely through the editor UI.
Common errors
error Error: EACCES: permission denied, open '/path/to/logfile.log' ↓
sudo chmod +r /path/to/logfile.log or adjust file ownership to the Node-RED user. error TypeError: Cannot read properties of undefined (reading 'split') ↓
msg.filename property passed to the node always contains a valid string path. error Error: ENOENT: no such file or directory, open '/path/to/nonexistent/file.log' ↓
Warnings
gotcha File permissions are critical. The Node-RED process (and thus the tail node) must have read access to the specified file and its parent directories. Lack of permissions will result in errors and the node failing to read the file. ↓
gotcha Monitoring very large files with extremely high write rates might impact Node-RED's performance due to continuous I/O and message processing. Consider filtering at the source or rate-limiting within the flow for high-volume logs. ↓
breaking The latest version of this node (0.4.0) was published 3 years ago. While generally functional, it may not be fully compatible with the absolute latest Node-RED runtime versions (e.g., 4.x and above) or newer Node.js LTS versions, potentially leading to unforeseen issues or deprecated API usage. ↓
Install
npm install node-red-node-tail yarn add node-red-node-tail pnpm add node-red-node-tail Imports
- Node-RED Tail Node (UI Component) wrong
import { TailNode } from 'node-red-node-tail'correctInstall via Node-RED Palette Manager or `npm install node-red-node-tail` in ~/.node-red
Quickstart
[{"id":"a1b2c3d4e5f6g7h8","type":"tail","name":"Tail syslog","file":"/var/log/syslog","delay":"0","format":"lines","x":120,"y":100,"wires":[["n1"]]},{"id":"n1","type":"debug","name":"Log Output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"currentPayload","statusType":"auto","x":340,"y":100,"wires":[]}]