To modify the VMware Syslog Collector configuration in the vCenter Server Appliance:
Note: Currently, there is no method in Web Client to configure the log rotation of the syslog collector on the vCenter Server Appliance.
- Log in to the vCenter Server Appliance as the root user.
- Take a backup of the /etc/vmware-syslog/custom-file-location.conf file by running the command:
cp /etc/vmware-syslog/custom-file-location.conf /etc/vmware-syslog/custom-file-location.conf.bak
- Open the custom-file-location.conf file using a text editor, such as vi.
- Locate this entry:
$template esx,"/var/log/vmware/esx/ %hostname% 10485760/50 %timestamp:::date-rfc3339% %syslogseverity-text% %hostname% %programname% %msg%"
Where:
10485760 is the size of the syslog file in bytes and 50 is the number of files to retain.
- To set size to 5MB and number of logs to 10, modify the entry to:
$template esx,"/var/log/vmware/esx/ %hostname% 5242880/10 %timestamp:::date-rfc3339% %syslogseverity-text% %hostname% %programname% %msg%"
- Restart the syslog collect service by running the command:
service-control --stop vmware-syslog
service-control --start vmware-syslog