Skip to content

florianorineveu/linux-server-monitoring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ก๏ธ Linux Server Monitoring Suite

ShellCheck License: MIT Bash Debian Ubuntu Maintenance PRs Welcome

Production-ready monitoring suite for Linux servers with intelligent false-positive filtering

A comprehensive collection of bash scripts for automated server monitoring, security scanning, and alerting. Built for reliability, with smart filtering to eliminate noisy false positives.

โœจ Features

  • ๐Ÿ”’ Security Scanning: Daily rootkit detection (rkhunter, chkrootkit, Lynis)
  • ๐Ÿณ Docker Monitoring: Track critical container health
  • ๐Ÿ“Š System Monitoring: Services, disk space, mail queue
  • ๐Ÿ“ง Smart Notifications: Email alerts only for real issues
  • โš™๏ธ External Configuration: Easy maintenance with separate config files
  • ๐ŸŽฏ STRICT/PARANOID Modes: Eliminate false positives intelligently
  • ๐Ÿ”„ Backup Verification: Ensure your backups are running
  • ๐Ÿ“ Detailed Logging: All events tracked for audit

๐ŸŽฏ Why This Project?

After managing multiple production servers, I got tired of:

  • โŒ Daily false-positive alerts from rkhunter
  • โŒ Noisy chkrootkit warnings about legitimate system files
  • โŒ Docker containers failing silently
  • โŒ Missed backup failures

This suite solves all of that with intelligent filtering and real-world tested configurations.

๐Ÿš€ Quick Start

# Clone the repository
git clone https://github.com/florianorineveu/linux-server-monitoring.git /opt/monitoring
cd /opt/monitoring

# Copy and configure
cp config/global.conf.example config/global.conf
cp config/services.conf.example config/services.conf
cp config/rkhunter.conf.example config/rkhunter.conf
cp config/chkrootkit.conf.example config/chkrootkit.conf

# Edit configuration files
nano config/global.conf          # Set EMAIL and HOSTNAME
nano config/services.conf        # List your services
nano config/rkhunter.conf        # Customize if needed
nano config/chkrootkit.conf      # Customize if needed

# Install dependencies
sudo apt-get update
sudo apt-get install -y rkhunter chkrootkit lynis fail2ban mailutils

# Set permissions
chmod +x scripts/*.sh
mkdir -p logs

# Install cron jobs (see examples/crontab.example)
sudo crontab -e

๐Ÿ“Š Available Scripts

Script Schedule Purpose
rkhunter-scan.sh Daily 2 AM Rootkit detection with intelligent filtering
chkrootkit-scan.sh Daily 3 AM Secondary rootkit scan (STRICT mode)
lynis-audit.sh Weekly (Sun 4 AM) Complete security audit
check-services.sh Hourly Monitor system services
check-docker-containers.sh Every 15 min Docker container health
check-minecraft-backup.sh Daily 8 AM Verify Minecraft server backups
check-disk-space.sh Every 6 hours Disk usage monitoring
check-mail-queue.sh Every 6 hours Mail queue monitoring

๐ŸŽ›๏ธ Configuration Modes

STRICT Mode (Recommended)

Filters out common false positives automatically. You only get alerts for real issues.

Perfect for: Production servers, daily operations

PARANOID Mode

Reports everything, including warnings. Requires manual tuning of ignore patterns.

Perfect for: Security audits, incident investigation

๐Ÿ“– Documentation

๐Ÿ”ง Requirements

  • OS: Debian 11+, Ubuntu 20.04+
  • Shell: Bash 5.0+
  • Privileges: Root access for monitoring (runs via cron)
  • Mail: Configured mail transport (Postfix, sendmail, etc.)

๐Ÿ’ก Use Cases

Perfect for:

  • ๐Ÿ–ฅ๏ธ VPS servers (OVH, DigitalOcean, Hetzner, AWS EC2, etc.)
  • ๐Ÿข Dedicated servers
  • ๐Ÿณ Docker-based infrastructure (Nextcloud, web services, etc.)
  • ๐ŸŽฎ Game servers (Minecraft, etc.)
  • ๐ŸŒ Web hosting environments

๐Ÿ“ˆ Real-World Usage

This suite is battle-tested on:

  • Multiple production VPS instances
  • Debian 13 environments
  • Docker deployments with 10+ containers
  • Servers running 24/7 for months

Result: Zero false-positive emails, reliable alerts for real issues.

๐Ÿค Contributing

Contributions are welcome! Please read CONTRIBUTING.md for details.

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ› Reporting Issues

Found a bug or false positive? Please open an issue with:

  • Your OS version
  • Script output/logs
  • Expected vs actual behavior

๐Ÿ“Š Project Stats

GitHub stars GitHub forks GitHub issues GitHub pull requests

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Inspired by real-world sysadmin challenges
  • Built with best practices from the Linux community
  • Tested in production environments

โญ Show Your Support

If this project helped you, please give it a star! โญ

It helps others discover the project and motivates continued development.

๐Ÿ“ฌ Contact

Florian Orineveu

๐Ÿ—บ๏ธ Roadmap

  • Signal/Discord/Slack notification support

Made with โค๏ธ by Florian "Ori" Neveu

Built from real production experience, for real production needs.

About

๐Ÿ›ก๏ธ My personal Linux server monitoring suite

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages