Reply to Message

View discussion in a popup

Replying to:
lukeglazebrook
Enthusiast
Enthusiast

Adding Syslog logging level possible?

Hi All,

Thanks in advance for any help you can provide, I already have a cool bit of PowerCLI that will configure the host Syslog servers in my environment.  I was however wondering if anyone is aware of how I can add to this and also tweak amend the logging level effectively editing the config.xml (which is required from my understanding ...

VMware vSphere 6.5 Documentation Library

The script I have been using to add add a specific syslog server ...

write-Host "Loading Automation Tools"

Add-PSSnapin VMware.VimAutomation.Core

# Establish Connection

Connect-VIServer -Server SecretServer.co.uk -User Luke@SecretDomain -Password TopSecretIWouldHaveToKillYouIfYouSawMe

Foreach ($vmhost in (get-vmhost))

{

$esxcli = Get-EsxCli -vmhost $vmhost

$esxcli.system.syslog.config.get()

}

Foreach ($vmhost in (get-vmhost))

{

$esxcli = Get-EsxCli -vmhost $vmhost

$esxcli.system.syslog.config.set($null, $null , $null, $null, $null, $null, $null, $null, “udp://Blah:514,udp://Blah:514,udp://svr0123:514”, $null, $null);

$esxcli.network.firewall.ruleset.set($null, $true, “syslog”)

$esxcli.system.syslog.reload()

}

Reply
0 Kudos