Workaround to enable log rotation
Use this workaround to enable log rotation for rsyslog.
Version 10.0.3 or earlier
For API Connect v10.0.3 or earlier on VMware, there is a known limitation in which prevents the log rotation feature from working correctly. The limitation can cause syslog to grow very large and consume all available disk space. In some cases, this can cause the node to go down.
To workaround this problem, use the following instructions to delete or move the syslog and fix log rotation:
- SSH into the appliance as root.
- If the existing syslog file is problematic, remove it:
- Change directory to
/var/log
. - Delete the syslog file.
Alternatively, if you need to retain the contents of the log file, move it to a location out of the VM.
- Change directory to
- Enable hourly log rotation:
- Run:
sed -i 's/invoke-rc.d\ rsyslog rotate\ >\ \/dev\/null/killall\ -HUP\ rsyslogd/g' /etc/logrotate.d/rsyslog
- Run:
sed -i 's/AccuracySec=12h/AccuracySec=1us/g; s/daily/hourly/gi' /lib/systemd/system/logrotate.timer
- Run
systemctl daemon-reload
- Run:
To review configuration steps for logging, see Configuring remote logging for a VMware deployment.