The definitive, zero-assumption MRTG installer for production hosting environments.
Most MRTG installers assume a "vanilla" OS. This suite is different. It was built specifically for DirectAdmin, cPanel, and Plesk environments where web servers, firewalls, and service paths are often customized.
π Key Features
π‘οΈ Production Hardened: Includes a lock-file system to prevent race conditions and data corruption.
π Auto-Detection: Dynamically detects Apache, Nginx, LiteSpeed, and Caddy.
π§ Mail Stack Monitoring: Deep integration for Rspamd (scanned vs. rejected), Exim, and Dovecot.
ποΈ Database Insights: Monitors MySQL/MariaDB connections and running threads.
β‘ Cache Monitoring: Native support for Redis memory and command throughput.
π₯ Firewall Aware: Automatically patches CSF, Firewalld, UFW, or iptables to allow SNMP traffic.
π Hosting Panel Ready: Native plugin support for DirectAdmin "Admin Level" visibility.
π οΈ Installation
Quick Start (Interactive)
Run the following command as root to start the guided installation wizard:
wget https://raw.githubusercontent.com/waelisa/mrtg/main/install-mrtg.sh
chmod +x install-mrtg.sh
./install-mrtg.shAutomated / Headless
For bulk deployment via Ansible or SSH loops:
./install-mrtg.sh --autoAfter install run this once
env LANG=C /usr/bin/mrtg /usr/local/mrtg/conf/mrtg.cfgπ Monitored Metrics
Category Description
System CPU Load, Physical Memory, Swap Usage, Disk I/O
Network Interface Throughput (In/Out), Error packets
Web Web Server Status, Request Latency
Email Rspamd Spam Filtering, Exim Queue, Dovecot Logins
Database MySQL Threads Connected, Running Queries
βοΈ Advanced Usage
The script includes a full suite of maintenance tools accessible via flags:
--status: Run a 12-point system health diagnostic.
--backup: Create a timestamped backup of your MRTG configurations.
--repair: Fix broken permissions, missing cron jobs, or stale lock files.
--update: Check for and apply the latest version of the Monitoring Suite.
π€ Contributing
Fork the Project
Create your Feature Branch (git checkout -b feature/AmazingFeature)
Commit your Changes (git commit -m 'Add some AmazingFeature')
Push to the Branch (git push origin feature/AmazingFeature)
Open a Pull Request
π License
Distributed under the MIT License. See LICENSE for more information.