Guides 11792 Published by

Webmin provides a convenient interface for keeping system logs from overflowing, letting administrators locate the log module, edit rotation policies, and add new log files without diving into shell commands. By setting parameters such as frequency, maximum size, and backup count, users can tailor how often logs rotate, cap their growth, and control retained history to balance auditability with disk space. The guide also explains how to configure alerts that trigger when a log exceeds a threshold, as well as manual cleanup steps through File Manager and syslog filter rules to drop unwanted messages. Overall, the article encourages maintaining lean, searchable logs while avoiding pitfalls like SSH hangs due to bloated files, and offers practical tips for staying ahead of storage nightmares.



Manage Your System Logs With Webmin – Keep the Backlog Short

If you’ve ever stared at a /var/log folder that looks like it’s been hit by a freight train, you know what I mean. Webmin lets you keep those logs from turning into a digital junk heap without having to sift through shell commands. In this guide we’ll walk through how to locate the module, tweak rotation rules, and set up alerts so your logs stay helpful instead of harmful.

Why You Need to Tidy Up

A bloated log file is more than just a storage nightmare; it can slow down services that parse them. For instance, after a kernel update on a test server I watched the kern.log balloon from 200 MB to 1.8 GB in under an hour, causing SSH authentication to hang when the system tried to read past entries. Cleaning up early saves time and prevents those headaches.

Finding the Log Module

Open Webmin and go straight to “System” => “System Logs.” If you’re on an older version, it might be under the “Servers” menu. Clicking this opens a table of log files already being monitored. This list is your starting point for any changes.

Reviewing Existing Rotation Rules

Each log entry shows its rotation policy: frequency, size limit, and backup count. Click the edit icon next to a file you care about (often syslog or auth.log). The “Logfile Settings” screen explains why each field matters:

  • Frequency – How often Webmin should rotate the file. Setting it daily keeps files small but can cause a spike in disk usage if logs grow fast.
  • Maximum size – A hard cap that forces rotation before the next scheduled cycle, useful for logs that burst unexpectedly.
  • Number of backups – Determines how many old copies survive. Too few and you lose history; too many waste space.

I usually set “Maximum size” to 200 MB for the main syslog and keep five backups. That balances auditability with storage constraints.

Adding a New Log File

If your application writes to a custom location, click “Add new log file.” Fill in:

1. Logfile name – e.g., /var/log/myapp.log.
2. File type – Usually “Plain text.”
3. Rotation frequency – I prefer hourly for high‑traffic services.
4. Maximum size – 100 MB works well here.

After saving, Webmin will start rotating that file automatically and add it to the monitoring list.

Configuring Alerts for Log Growth

Sometimes you want a heads‑up before a log explodes. In the “System Logs” main view, click “Configure alerts.” Choose the log file, set a threshold (e.g., 250 MB), and specify notification methods—email or Webmin’s internal message system works great for quick alerts. I found this handy after my database server started dumping duplicate entries during a backup script failure.

Cleaning Up Old Logs Manually

If you need to clear space immediately, go back to “System” => “File Manager,” navigate to /var/log, and delete or compress old files. Webmin will automatically skip missing logs when rotating next time, but double‑check that no critical data was removed.

Preventing Log Floods with Syslog Filters

Webmin lets you edit the underlying rsyslog configuration via “System” => “Syslog.” If a process is spamming messages, add a rule to drop or redirect those entries. For example:

:msg, contains, "DEBUG" ~

This line tells rsyslog to discard any message containing “DEBUG,” which can save tens of megabytes per hour on development machines.

Wrapping It Up

With these tweaks you’ll keep your system logs lean, searchable, and less likely to turn into a storage nightmare. Remember: the goal isn’t to silence every message but to ensure only useful information survives long enough for analysis.