Guys, i need to modify the syslog config to add a new host across 100 ESXi servers. I thought using a host profile would be the easiest way to go but how do I create a host profile that only contains syslog options?
You can Create a Host Profile (new) or Duplicate a Host Profile and Edit a Host Profile
Disable all settings including inside the folder see this guide Disable Host Profile Component
Expand the Advanced Configuration Settings, tick the checkbox Syslog.global.logHost and specify your new syslog with format tcp://hostname:514 or udp://hostname:514 or ssl://hostname:514.
This procedure is also documented in this KB: Configuring syslog on ESXi (2003322) | VMware KB
Other alternative method is to use VMware PowerCLI and use cmdlet Set-VMHostSysLogServer
Set-VMHostSysLogServer - PowerCLI VMware.VimAutomation.Core Help Reference
All host: Get-VMHost | Set-VMHostSysLogServer -SysLogServer <syslog server IP address/hostname> -SysLogServerPort 514
Hosts on specific cluster: Get-Cluster 'Cluster Name' | Get-VMHost | Set-VMHostSysLogServer -SysLogServer <syslog server IP address/hostname> -SysLogServerPort 514
Create a host profile with Syslog.global.logHost as the option name and the name or IP address of the syslog server as the option value. Write a rule that applies the host profile to all hosts that you want to provision with the settings that you specified in the reference host.
Refer below link for Creating Host profile with syslog option.
Refer below link to create link for writing rule.
You can Create a Host Profile (new) or Duplicate a Host Profile and Edit a Host Profile
Disable all settings including inside the folder see this guide Disable Host Profile Component
Expand the Advanced Configuration Settings, tick the checkbox Syslog.global.logHost and specify your new syslog with format tcp://hostname:514 or udp://hostname:514 or ssl://hostname:514.
This procedure is also documented in this KB: Configuring syslog on ESXi (2003322) | VMware KB
Other alternative method is to use VMware PowerCLI and use cmdlet Set-VMHostSysLogServer
Set-VMHostSysLogServer - PowerCLI VMware.VimAutomation.Core Help Reference
All host: Get-VMHost | Set-VMHostSysLogServer -SysLogServer <syslog server IP address/hostname> -SysLogServerPort 514
Hosts on specific cluster: Get-Cluster 'Cluster Name' | Get-VMHost | Set-VMHostSysLogServer -SysLogServer <syslog server IP address/hostname> -SysLogServerPort 514