You can use the vSphere Client, the VMware Host Client, or the esxcli system syslog command to configure the syslog service.
The syslog service receives, categorizes, and stores log messages for analyses that help you take preventive action in your environment.
Set ESXi Syslog by using the vSphere Client
You can use the vSphere Client command to configure the syslog service globally and edit various advanced settings.
- Browse to the ESXi host in the vSphere Client inventory.
- Click Configure.
- Under System, click Advanced System Settings.
- Click Edit.
- Filter for syslog.
- To set up logging globally and configure various advanced settings, see ESXi Syslog Options.
- (Optional) To overwrite the default log size and log rotation for any of the logs:
- Click the name of the log that you want to customize.
- Enter the number of rotations and the log size you want.
- Click OK.
Set ESXi Syslog by using the VMware Host Client
You can use the VMware Host Client to configure and edit syslog service parameters on ESXi hosts.
- In the VMware Host Client , under Host, click Manage > System > Advanced settings.
- In the Search panel, type a syslog setting you want to define. See ESXi Syslog Options.
- Select the setting and click Edit option.
- Set the value as described in the table of parameters in ESXi Syslog Options.
- Click Save.
Set ESXi Syslog by using ESXCLI
You can configure the syslog service on ESXi hosts by using the ESXCLI command:
esxcli system syslog config set <syslog option>.
For information about using the esxcli system syslog command and other ESXCLI commands, see Getting Started with ESXCLI. For details how to open the ESXi firewall for the port specified in each remote host specification, see Configuring the ESXi Firewall.
Using ESXCLI requires ESXi to open SSH logins, which is a security risk, and is not recommended. If you chose to use ESXCLI, make sure you use the esxcli system syslog reload command after setting each parameter to make sure that it takes effect.
- ♦ Use the ESXCLI command
esxcli system syslog config set <syslog option>to set a syslog option that you decide to enable. For example, to set the Syslog.global.logHost option, use the command
esxcli system syslog config set --loghost=<str>
After setting Syslog.global.logHost, ESXi hosts open and maintain connections to the syslog collectors, and the transmission of messages begins immediately. When ESXi generates a syslog message, it writes it to the appropriate log file on the ESXi host and also forwards it to all configured syslog collectors.