How to configure syslog options from ESXi command line

If you prefer to configure syslog options using ESXi command line, you can do it using the following esxcli commands:

To configure syslog to log to your local datastore, use the following command:

esxcli system syslog config set --logdir=/vsanDatastore/logs/s-esx-esx01.sefnet.local

In this case, logs will be saved on vSAN datastore under directory logs. Remember that directories logs and s-esx-esx01.sefnet.local must be created prior to running this command, otherwise, you will receive a famous “A general system error occurred: Internal error” error.

To configure syslog to log to a remote syslog host, use the following command:

esxcli system syslog config set --loghost=udp:/v-vmw-syslog01.sefnet.local:514

This will configure syslog option to log to a host v-vmw-syslog01.sefnet.local on UDP port 514. Here you can use UDP or TCP ports. If you plan to use UDP, then you must install VMware ESXi 5.0, Patch ESXi-5.0.0-20120704001-standard (2019113)

Leave a Reply

Your email address will not be published. Required fields are marked *