Registry / data / node-red-node-tail

node-red-node-tail

JSON →
library0.4.0jsnpmunverified

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.

npm install node-red-node-tail
INSTALL
IMPORT
SIG · NODE-RED-NODE-TAIL
N
node-red-node-tail
datajavascriptv0.4.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Node-RED Tail Node (UI Component)
Install via Node-RED Palette Manager or `npm install node-red-node-tail` in ~/.node-red
import { TailNode } from 'node-red-node-tail'
This package provides a Node-RED editor component, not a direct JavaScript library for programmatic import. Users interact with it by dragging the 'tail' node onto a flow in the Node-RED editor, configuring its properties (like file path), and connecting it to other nodes.

This Node-RED flow demonstrates how to install and configure the 'tail' node to monitor a system log file (e.g., /var/log/syslog) and output new lines to the debug sidebar.

[{"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":[]}]
Debug
Known issues
gotchaFile 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.
fix
Ensure the Node-RED user has appropriate read permissions (e.g., `sudo chmod +r /var/log/syslog` or adjust user/group ownership) for the target file.
affects: >=0.1.0
gotchaMonitoring 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.
fix
For high-volume scenarios, implement additional filtering nodes downstream (e.g., `switch` node) or consider external log processing tools before feeding into Node-RED. Optimize file access and ensure sufficient system resources.
affects: >=0.1.0
breakingThe 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.
fix
Test thoroughly with your specific Node-RED and Node.js versions. If issues arise, check the Node-RED forums or GitHub issues for similar reports. Consider using a more actively maintained `node-red-contrib-tail-file` package if official support is critical.
affects: <=0.4.0
Errors
Common errors & fixes
Error: EACCES: permission denied, open '/path/to/logfile.log'
The Node-RED process does not have sufficient read permissions for the specified file.
fix
Ensure the user running Node-RED has read access to the file. For example, `sudo chmod +r /path/to/logfile.log` or adjust file ownership to the Node-RED user.
TypeError: Cannot read properties of undefined (reading 'split')
This error can occur if the 'tail' node receives a non-string input or if the file content is unexpectedly malformed when processing lines.
fix
Verify that the file being tailed contains expected text data. If feeding dynamic paths, ensure the `msg.filename` property passed to the node always contains a valid string path.
Error: ENOENT: no such file or directory, open '/path/to/nonexistent/file.log'
The configured file path for the 'tail' node points to a file that does not exist on the filesystem.
fix
Double-check the file path configured in the 'tail' node's properties. Ensure the file exists at that exact location on the server where Node-RED is running.
Upgrade
Version history
0.4.0latest on npm
Audit
Dependencies
node-redrequiredThis package is a Node-RED node and requires the Node-RED runtime to function as a peer dependency.
Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
2
Resources
node-red-node-tail — npm install node-red-node-tail · libregistry