Reload syslog configuration on ESXi

I recently updated Log Insight to version 3.3.2 in my lab. After selecting the appropriate PAK file, the UI displayed a warning containing the following text:

Note that certain builds of ESXi need to have 
their syslog configuration reloaded after restart, 
otherwise log data will stop forwarding. 
Configuration can be reloaded from the vSphere 
Integration page. See the Online Help for 
more information.

I waited a couple hours after the upgrade to check back on the system and noticed that I was no longer collecting syslog data. I visited the vSphere Integration page and reviewed my hosts, but they were already configured as expected. I picked just one host and updated the configuration anyway, and that host started logging data again. For another host, I manually cleared the syslog.global.logHost value from the web client and then re-entered the logHost text. This also caused the host to start sending syslog data again. Interested in the minimum effort to ‘reload’ syslog configuration (without needing to update/reset logHost values) I found the following KB article: https://kb.vmware.com/kb/2003322. It appears that esxcli has an option to simply reload the configuration (using esxcli system syslog reload). To run this on all hosts remaining in my inventory, I executed the following code:

1
2
3
4
Get-VMHost | Sort-Object Name | %{
write-host -nonewline "$($_.Name) reloading syslog:"
(Get-EsxCli -VMHost $($_.Name) -v2).system.syslog.reload.invoke()
}

Note: this requires the latest version (6.3 release 1) of PowerCLI. I hope someone finds this information helpful.

Leave a Reply

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

*

Notify me of followup comments via e-mail. You can also subscribe without commenting.