Simple, automated log file monitoring with email notifications.
Scan your log files for errors, exceptions, and warnings β get instant email alerts when issues are detected.
| 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 | Only scans new content since last check β efficient for cron |
| π¦ Standalone Executable | No Python required on your servers |
| π§ Flexible Configuration | Environment variables or config file |
# Download the latest release
wget https://github.com/VGXConsulting/LogMon/releases/latest/download/log_monitor-linux-x86_64.tar.gz
# Extract
tar -xzf log_monitor-linux-x86_64.tar.gz
# Make executable
chmod +x log_monitor
# Configure
cp log_monitor.conf.example log_monitor.conf
nano log_monitor.conf
# Test
./log_monitor --debug
# Clone the repository
git clone https://github.com/VGXConsulting/LogMon.git
cd LogMon
# Configure
cp log_monitor.conf.example log_monitor.conf
nano log_monitor.conf
# Run
python3 log_monitor.py --debug
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
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 |
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, returned non-zero,
aborted, killed
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
# Normal mode (silent unless errors found)
./log_monitor
# Debug mode (detailed output)
./log_monitor --debug
# Show version
./log_monitor --version
# Show help
./log_monitor --help
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 timeout2026-01-22 10:15:32 /var/log/app/app.log 89 Exception in thread main2026-01-22 10:15:32
# 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
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