Translate

Total Pageviews

My YouTube Channel

Thursday 18 June 2015

Configuring log rotation by file size in the VMware vRealize Automation appliance (2087160)

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:
  1. 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.
  2. 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:
  1. Log in to the VMware vRealize Automation appliance.
  2. Navigate to this location:

     /etc/logrotate.d/
  3. 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:
  1. 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
  2. Save the file.
  3. 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