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.

Procedure

  1. Browse to the ESXi host in the vSphere Client inventory.
  2. Click Configure.
  3. Under System, click Advanced System Settings.
  4. Click Edit.
  5. Filter for syslog.
  6. To set up logging globally and configure various advanced settings, see ESXi Syslog Options.
  7. (Optional) To overwrite the default log size and log rotation for any of the logs:
    1. Click the name of the log that you want to customize.
    2. Enter the number of rotations and the log size you want.
  8. Click OK.

Results

Changes to the syslog options take effect.
Note: Syslog parameter settings that you define by using the vSphere Client or VMware Host Client are effective immediately. However, most settings you define by using ESXCLI require an additional command to take effect. For more details, see ESXi Syslog Options.

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.

Procedure

  1. In the VMware Host Client , under Host, click Manage > System > Advanced settings.
  2. In the Search panel, type a syslog setting you want to define. See ESXi Syslog Options.
  3. Select the setting and click Edit option.
  4. Set the value as described in the table of parameters in ESXi Syslog Options.
  5. 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>.

Prerequisites

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.

Note:

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.

Procedure

  • 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.