? System Monitoring and Log Management

ISPConfig Monitor Overview

Access monitoring via Monitor tab in ISPConfig to view:

  • System status and health
  • Service status (Apache, MySQL, Mail, etc.)
  • Resource usage (CPU, RAM, Disk)
  • Log files
  • Mail queue
  • Traffic statistics

System State Overview

Services Monitoring

Service Port Status Check
Apache/Nginx 80, 443 HTTP response
MySQL/MariaDB 3306 Connection test
Postfix (SMTP) 25, 587 SMTP response
Dovecot (IMAP/POP3) 110, 143, 993, 995 Login test
BIND (DNS) 53 DNS query
Pure-FTPd 21 FTP response

Resource Monitoring

CPU and Load Average

  • Load average: 1min, 5min, 15min
  • CPU usage percentage
  • Process count
  • Alert thresholds configurable

Memory Usage

  • Total RAM
  • Used/Free memory
  • Swap usage
  • Buffer/Cache memory

Disk Usage

  • Filesystem usage per partition
  • Inode usage
  • Alert at 80% and 90% full

Log File Locations

# System logs
/var/log/syslog           # System messages
/var/log/auth.log         # Authentication logs
/var/log/mail.log         # Mail server logs

# Web server logs
/var/log/apache2/error.log    # Apache errors
/var/log/apache2/access.log   # Apache access
/var/log/nginx/error.log      # Nginx errors

# ISPConfig logs
/var/log/ispconfig/ispconfig.log     # ISPConfig system
/var/log/ispconfig/cron.log          # Cron execution
/var/log/ispconfig/auth.log          # Authentication

# Website logs
/var/www/clients/client1/web1/log/error.log    # Site errors
/var/www/clients/client1/web1/log/access.log   # Site access

Traffic Statistics

AWStats Configuration

  1. Enable statistics for website
  2. Choose statistics program (AWStats/Webalizer)
  3. Set statistics password
  4. Access at: https://yourdomain.com/stats

Traffic Quota Monitoring

  • Monthly traffic usage
  • Quota limits per site
  • Alert before quota exceeded
  • Auto-suspend at limit

Mail Queue Management

View Mail Queue

# Command line
mailq

# ISPConfig Monitor
Monitor → Mail Queue

# Count messages
mailq | grep -c "^[A-Z0-9]"

Manage Queue

# Flush mail queue
postqueue -f

# Delete all queued mail
postsuper -d ALL

# Delete specific message
postsuper -d MESSAGE_ID

# Hold/release messages
postsuper -h MESSAGE_ID
postsuper -H MESSAGE_ID

Error Log Analysis

Common Apache Errors

  • 500 Error: Check PHP errors, .htaccess syntax
  • 403 Forbidden: Permission issues, directory index
  • 404 Not Found: Missing files, wrong paths
  • 503 Service Unavailable: Server overload, maintenance

MySQL Error Monitoring

# Check MySQL error log
tail -f /var/log/mysql/error.log

# Check slow queries
tail -f /var/log/mysql/slow.log

# Monitor connections
mysqladmin -u root -p processlist

Performance Monitoring Tools

Built-in Tools

# System load
top
htop

# Disk I/O
iotop
iostat -x 1

# Network traffic
iftop
nethogs

# Process monitoring
ps aux | grep apache2
ps aux | grep mysql

Setting Up Alerts

  1. Go to Monitor → System State
  2. Configure alert thresholds
  3. Set notification email
  4. Choose alert frequency
  5. Test alert system

Log Rotation

ISPConfig configures logrotate automatically:

/var/www/clients/client*/web*/log/*.log {
    daily
    missingok
    rotate 7
    compress
    delaycompress
    notifempty
}

Security Monitoring

Failed Login Attempts

# Check authentication failures
grep "Failed password" /var/log/auth.log

# ISPConfig login attempts
grep "Failed login" /var/log/ispconfig/auth.log

# Mail authentication failures
grep "authentication failed" /var/log/mail.log

Fail2ban Integration

  • Monitors log files for intrusion attempts
  • Automatically bans suspicious IPs
  • Configurable ban duration
  • Whitelist trusted IPs
Tip: Regular monitoring helps identify issues before they become critical. Set up alerts for important thresholds.
Var dette svaret til hjelp? 0 brukere syntes dette svaret var til hjelp (0 Stemmer)