Quantcast
Channel: VMware Communities: Message List - vCenter™ Server
Viewing all articles
Browse latest Browse all 15787

Re: vCenter Appliance syslog rotation

$
0
0

This is how I have configured the vCenter Appliance to rotate the syslogs from my ESXi hosts.  I'm not sure if these changes are supported by VMware, or if they survive an upgrade, so buyer beware.

  1. Backup the syslog-collector.conf configuration file.
    cp /etc/syslog-ng/syslog-collector.conf /etc/syslog-ng/syslog-collector.conf.orig
  2. Edit syslog-collector.conf and change the file format:
    file("/var/log/remote/$HOST_FROM/messages"
  3. Reload syslog-collector service.
    /etc/init.d/syslog-collector reload

 

If you use the same file format as I have then you should now have a messages file for each host under /var/log/remote/hostname.  I use the following config file to rotate the logs daily:

/etc/logrotate.d/syslog-remote

/var/log/remote/*/messages {  daily  compress  delaycompress  rotate 14  postrotate    /etc/init.d/syslog-collector reload > /dev/null  endscript
}

Viewing all articles
Browse latest Browse all 15787

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>