We are on Private Cloud Release 4.16.01.00. The ZooKeeper log size is continuously increasing.
How can we get them to rotate?
/opt/apigee/var/log/apigee-zookeeper> ls -lh
total 1.6G
-rw-r--r-- 1 apigee apigee 1.6G Aug 17 19:44 apigee-zookeeper.log
Can you verify it's log files and not snapshot files in the log directory. The logs are set on rotation by default. Please revert back once you can find out.
There were only log files apigee-zookeeper.log and config.log. There were no snapshot files.
I did a local installation and realised that in 4.16.01.00, we only have the following files in /opt/apigee/var/log/apigee-zookeeper directory
apigee-zookeeper.log
config.log
Also I found that on 4.16.01.00, the log rotation is not enabled by default. We have to enable log rotation by following the instructions provided here under the section "Log File Maintenance" for ZooKeeper.
If you want something other than rotation by size, you can also use logrotate.
Daily rotation example. Keeps 30 days, compresses after the next successful rotate.
Does nothing if the log is empty.
copytruncate to prevent necessity of service restart.
/opt/apigee/var/log/apigee-zookeeper/*.log { daily missingok rotate 30 copytruncate compress delaycompress notifempty nocreate }