Logwatch Log File Monitor is a skill that watches log files in real-time and sends alerts to a Telegram chat when specified patterns are detected. It can monitor any readable log file, including system logs such as /var/log/syslog, application logs, and web access logs.
Pattern matching is driven by user-defined regular expressions. Built-in defaults cover common cases like ERROR, WARN, and exception strings, but any custom regex can be configured. Each pattern carries a severity level — high, medium, or low — so alerts carry context about the significance of the match.
Smart position tracking means the skill only reads new lines since the last check, avoiding duplicate alerts on previously scanned content. When a match is found, the Telegram alert includes the log file path, the matched pattern name, and the full line content, giving enough context to act without opening the log manually.
Configuration is done through a config.json file that lists file paths and pattern definitions. Telegram credentials (bot token and chat ID) are supplied via a .env file. The skill requires Node.js v18 or later and a free Telegram account. There is no package registry entry; installation involves unzipping the provided archive, running npm install, and starting the watcher with node src/index.js watch.
This skill is suited to infrastructure monitoring, application error detection, and any workflow where an operator or AI agent needs immediate notification when a log line matches a critical pattern.