LogMon

VGX Consulting

πŸ“‹ LogMon

Simple, automated log file monitoring with email notifications.

Release License Platform

Scan your log files for errors, exceptions, and warnings β€” get instant email alerts when issues are detected.


✨ Features

Feature Description
πŸ” Smart Pattern Detection Detects errors, exceptions, warnings, timeouts, and more using optimized regex
πŸ“§ Email Notifications Instant HTML email alerts via secure SMTP/SSL
⚑ High Performance Concurrent scanning with thread pools and compiled regex
⏱️ Incremental Scanning Per-file byte offset tracking β€” only scans new lines, handles log rotation
πŸ“¦ Standalone Executable No Python required on your servers
πŸ”„ Self-Updating Automatically updates itself from GitHub Releases (once daily)
πŸ”§ Flexible Configuration Environment variables or config file

πŸ†• What’s New in v1.5.2

v1.5.1

v1.5.0

v1.4.9

v1.4.8

v1.4.7

v1.4.6

v1.4.5

v1.4.4

v1.4.3

v1.4.2


πŸ“¦ Installation

curl -sfL https://raw.githubusercontent.com/VGXDigital/LogMon/main/install.sh | bash

Or specify an install directory:

curl -sfL https://raw.githubusercontent.com/VGXDigital/LogMon/main/install.sh | bash -s -- /opt/logmon

Then configure and test:

cp log_monitor.conf.example log_monitor.conf
nano log_monitor.conf
./log_monitor --debug

Option 2: Run with Python

# Clone the repository
git clone https://github.com/VGXDigital/LogMon.git
cd LogMon

# Configure
cp log_monitor.conf.example log_monitor.conf
nano log_monitor.conf

# Run
python3 log_monitor.py --debug

πŸ”§ Configuration

Edit log_monitor.conf with your settings:

[SMTP]
server = smtp.example.com
port = 465
username = your_smtp_username
password = your_smtp_password
from_email = monitoring@example.com
to_email = admin@example.com

[Paths]
log_dir = /var/log/myapp

[Settings]
# Auto-update is on by default. Disable with:
auto_update = false

The config file is looked up in this order:

  1. Current working directory
  2. Same directory as the log_monitor binary

Environment Variables

Environment variables override config file settings. Use the VGX_LM_ prefix:

Variable Description
VGX_LM_SMTP_SERVER SMTP server hostname
VGX_LM_SMTP_PORT SMTP port (default: 465)
VGX_LM_SMTP_USERNAME SMTP username
VGX_LM_SMTP_PASSWORD SMTP password
VGX_LM_SMTP_FROM From email address
VGX_LM_SMTP_TO Recipient email address
VGX_LM_LOG_DIR Directory to scan for *.log files

πŸ” Detected Patterns

LogMon scans for these error indicators:

error, fail, exception, traceback, critical, fatal,
warning, not found, permission denied, connection refused,
timeout, unable to, could not, exit code N (non-zero only),
returned non-zero, aborted, killed

⏰ Automation (Cron)

Add to crontab for automated monitoring:

# Edit crontab
crontab -e

# Run every 15 minutes
*/15 * * * * cd /path/to/logmon && ./log_monitor

# Or with debug logging
*/15 * * * * cd /path/to/logmon && ./log_monitor --debug >> /var/log/logmon.log 2>&1

πŸ“– Usage

# Normal mode (silent unless errors found)
./log_monitor

# Debug mode (detailed output)
./log_monitor --debug

# Truncate all monitored log files (useful in test)
./log_monitor --truncate-logs

# Check for and install latest version
./log_monitor --update

# Show version
./log_monitor --version

πŸ“§ Email Alert Example

When errors are detected, you’ll receive an HTML email like:

Log Monitor Alert: 3 error(s) detected

File Line Content Timestamp
/var/log/app/error.log 142 ERROR: Connection timeout 2026-01-22 10:15:32
/var/log/app/app.log 89 Exception in thread main 2026-01-22 10:15:32

πŸ—οΈ Building from Source

# Install build dependencies
pip install -r requirements.txt

# Build standalone executable
pyinstaller --onefile --name log_monitor log_monitor.py

# Executable will be at dist/log_monitor

πŸ“„ License

Proprietary Software β€” Β© 2026 VGX Consulting. All rights reserved.

Unauthorized copying, modification, distribution, or use of this software is strictly prohibited.


Made with ❀️ by VGX Consulting