This article is intended for Linux server administrators with experience managing Munin and logrotate. If your server is hosted with Maxer, please contact our support team and we can do this for you. Do not attempt these steps if you are unsure.
Munin generates statistics every 5 minutes, which can cause log files in /var/log/munin/
(such as munin-update.log
and munin-node.log
) to grow very large over time. By default, cPanel servers do not rotate Munin logs, unlike most other services. You can configure log rotation with logrotate to prevent disk usage issues.
Step 1: Check Munin log sizes
Login to SSH as root and run:
This will show you how large the log files are.
Step 2: Create a logrotate configuration
Open (or create) the Munin config file:
Paste the following configuration:
Explanation:
-
daily
→ rotate logs every day (you may useweekly
if preferred) -
rotate 7
→ keep 7 archives before deleting -
compress
→ compress rotated logs -
missingok
→ don’t report errors if log is missing -
notifempty
→ don’t rotate empty logs
Step 3: Save and exit
Press Ctrl + X
, then Y
to save and exit.
Step 4: Test logrotate
Logrotate runs automatically via cron, but you can test immediately:
Step 5: Verify
Check the log directory again:
You should now see compressed (.gz
) log files and reduced sizes.
✅ That’s it — Munin logs will now rotate automatically.
Updated by SP on 02/10/2025