formz
Enthusiast
Enthusiast

Component Log Levels

I have a powercli script to change hostd and vpxa log levels within a cluster, but I'm just now realizing there are tons of others under the Config.HostAgent advanced setting.

Their layout is slightly different and getting the value of Config.HostAgent.log.level works just fine, but not Config.HostAgent.level[Vmsvc].logLevel. None of the component services are working via powercli.

Typically, the script looks similar to:

$hostlog="Config.HostAgent.log.level"

Get-AdvancedSetting -Entity $esxhost -name $hostlog |Set-AdvancedSetting -Value "error"  -Confirm:$false

I followed a similar pattern with the others.

$vmsvc="Config.HostAgent.level[Vmsvc].logLevel"

Get-AdvancedSetting -Entity $esxhost -name $vmsvc |Set-AdvancedSetting -Value "error"  -Confirm:$false

But it's not setting any values.

If I test with:

$blah = Get-AdvancedSetting -Entity $esxhost -name $hostlog and then echo $blah I get a "error" level which is expected.

When I do the same thing:

$blah = Get-AdvancedSetting -Entity $esxhost -name $vmsvc and then echo $blah I get nothing. I'm getting ZERO errors when trying to set it but it's not actually doing anything.

Even if I MANUALLY set the value within the vsphere client and just try to return the value with powercli I get nothing.

What the hell am I doing wrong??

0 Kudos
0 Replies