Purpose
This article provides steps to configure the log rotation in the VMware vRealize Automation (formerly known as vCloud Automation Center) appliance by file size instead of daily rotation, which is by default.
Resolution
To configure the log rotation in the VMware vRealize Automation appliance by file size:
- Set the maximum log file size for the vRealize Orchestrator (formerly known as vCenter Orchestrator) and VMware vRealize Automation (formerly known as vCloud Automation Center) logs.
- Configure a cron job to run logrotate based on a time interval.
To set the maximum log file size for vRealize Orchestrator and VMware vRealize Automation logs:
- Log in to the VMware vRealize Automation appliance.
- Navigate to this location:
/etc/logrotate.d/ - Edit the vcac.lr and vco.lr files and add the size entry. This sets the minimum file size detected before rotation occurs.
For example, after configuring the catalina.out (vcac.lr)log file for 100 MB maximum file size:
/var/log/vmware/vcac/catalina.out {
daily
rotate 5
dateext
compress
minsize 5M
missingok
nocreate
notifempty
sharedscripts
copytruncate
su vcac vcac
size 100M
}
After setting the maximum log file size, configure a cron job to run logrotate based on a time interval:
- From the /etc/logrotate.d/ location, run this command:
crontab -e
In this example, the first line sets logrotate to run against the VMware vRealize Automation logs at the start of the hour. The second line sets logrotate to run against the vRealize Orchestrator logs after 5 minutes of start of each hour:
0 */1 * * * /usr/sbin/logrotate /etc/logrotate/d/vcac.lr
5 */1 * * * /usr/sbin/logrotate /etc/logrotate/d/vco.lr - Save the file.
- Run this command to confirm that the information is configured properly:
crontab -l
Source KB:-
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2087160&src=vmw_so_vex_ragga_1012
No comments:
Post a Comment