The following log.rotate configuration is setup by BOSH agent:
$ cat /etc/logrotate.d/vcap
# Generated by bosh-agent
/var/vcap/data/sys/log/*.log /var/vcap/data/sys/log/.*.log /var/vcap/data/sys/log/*/*.log /var/vcap/data/sys/log/*/.*.log /var/vcap/data/sys/log/*/*/*.log /var/vcap/data/sys/log/*/*/.*.log {
missingok
rotate 7
compress
copytruncate
size=50M
}
This configuration file controls all the log rotation properties for different BOSH jobs logging on the VM.
BOSH agent has a property max_log_file_size in its internal spec.json:
cat spec.json
{"properties":{"logging":{"max_log_file_size":""}},
The BOSH agent max_log_file_size is not directly tunable via deployment manifests. The Director FILTERS the instance group fragment before passing it to the agent during apply, making this property not directly configurable.
The config file /etc/logrotate.d/vcap is editable, however does not persist through VM recreation.
Potential workarounds to this: