ESXi will not resume syslog log sending when destination has been down for some time

Recently I was playing with ESXi syslog and Logstash + Graylog. For some reason Logstash instance died. After restarting the Logstash only some ESXi hosts resumed log sending. Quick google search revealed that it is a know issue and solution is to reload syslog on the host. After running following script in PowerCLI against my vCenter the log sending resumed.

$hosts = Get-VMHost
foreach($vihost in $hosts){
$esxcli = get-vmhost $vihost | Get-EsxCli
$esxcli.system.syslog.reload()
}

Good information about PowerCLI and ESXCLI:
http://www.virten.net/2016/11/how-to-use-esxcli-v2-commands-in-powercli/
http://www.virten.net/2014/02/howto-use-esxcli-in-powercli/

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s