VMware vSphere ESXi 5.0 hosts run a syslog service (
vmsyslogd) that provides a standard mechanism for logging messages from the VMkernel and other system components. By default in ESXi, these logs are placed on a local scratch volume or a ramdisk. To preserve the logs further, ESXi can be configured to place these logs to an alternate storage location on disk, and to send the logs across the network to a syslog server.
Retention, rotation and splitting of logs received and managed by a syslog server are fully controlled by that syslog server. ESXi 5.0 cannot configure or control log management on a remote syslog server. For more information, see the documentation for the syslog server.
Regardless of the additional syslog configuration specified using these options, logs continue to be placed on the default locations on the ESXi host. For more information, see Location of ESXi log files (1021801).
Previous version of vSphere ESXi are configured differently. For more information, see Enabling syslog on ESXi 3.5 and 4.x (1016621).
If vSphere Syslog Collector will be used to receive logs from ESXi hosts, see Redirect ESXi System Log Files to the vCenter Server Appliance in the vCenter Server and Host Management guide or Install vSphere Syslog Collector in the vSphere Installation and Setup Guide.
Configuration of the syslog service on ESXi 5.0 can be performed using Host Profiles, the vCLI, or the Advanced Configuration options in the vSphere Client. Select the method most appropriate for your environment. Configuration cannot be performed using the
A location on a local or remote datastore and path where logs are saved to. Has the format
|A remote server where logs are sent using the syslog protocol. If the |
|A boolean option which controls whether a host-specific directory is created within the configured |
|The maximum number of log files to keep locally on the ESXi host in the configured logDir. Does not affect remote syslog server retention. Defaults to |
The maximum size, in kilobytes, of each local log file before it is rotated. Does not affect remote syslog server retention. Defaults to
Local and Remote syslog functionality can be configured for a host using the esxcli command line utility, which can be used at the console of an ESXi host, in the vCLI, or in the vMA. For more information, see Configuring ESXi Syslog Services in the vSphere Command-Line Interface Documentation.
esxclicommand is available, such as the vCLI or on the host directly.
esxcli system syslog config get
esxcli system syslog config set --logdir=/path/to/directory/ --loghost=RemoteHostname --logdir-unique=true|false --default-rotate=NNN --default-size=NNN
esxcli system syslog config set --loghost='tcp://10.11.12.13:514'
esxcli system syslog reload
Local and Remote syslog functionality can be configured for a cluster of similar hosts using Host Profiles. For more information, see the Set Up Syslog from the Host Profiles Interface section of the vSphere Installation and Setup guide.
esxclior advanced configuration options, and captured this as a reference host, the 5 configuration options are already visible under the Advanced Configuration option section.
esxcfg-advcfgcommand. For more information on setting advanced configuration options using each method, see Configuring advanced options for ESX/ESXi (1038578).