Posts

Showing posts with the label SysLog

ESXi Syslog to Multiple Servers

 Hey guys - just a quick note today.  I was configuring a second Syslog server for a customer's ESXi via the Syslog.global.logHost advanced setting, but was getting a generic "Internal Error" error whenever I tried to save my configuration.  Some quick googling made it look like this might be related to the scratch directory configuration having a problem or possibly the Syslog.global.logDir setting pointing at a folder that didn't exist, but in this case it was much simpler. When setting up multiple logHosts, the example shows "udp://hostName:514, hostName2, ssl://hostName3:1514" but that's not actually the correct syntax to use.  It should be "udp://hostName:514,hostName2,ssl://hostName3:1514" to get it working.  Note that the servers are separated only by commas, instead of by a comma and a space.

Displaying a list of ESXi Hosts and their Syslog Configurations

One of my customers recently found that their ESXi hosts were not uniformly configured for syslog shipping, so asked me to help them audit their environment.  They have hundreds of ESXi hosts, so going through the advanced settings in the GUI for each of their hundreds of hosts didn't seem like the best approach... PowerCLI to the rescue! In this case, I put together a quick one-liner.  It gets all of the VMHosts, then generates a string in the format of "<ESXi Hostname>,<Configured SysLog Host>".  That string is then parsed by the convertfrom-csv cmdlet, which adds the "VMHost" and "SysLogServer" headers to the line.  That line is then output and the system moves on to the next host in the list.  When the command is completed, the system has generated a nice table with a "VMHost" column that is populated by ESXi hostnames and a "SysLogServer" column that is populated with their configured Syslog servers. Importantly...