Bug report: Powershell client doesn't use configured client name
list Glauber Ribeiro
Tue, 9 Sep 2014 16:12:18 +0000
Message-Id: <user-e4a387c53df7@xymon.invalid>
The Powershell client looks up the client name to send to xymon from
[System.Net.NetworkInformation.IPGlobalProperties]::GetIPGlobalProperties()
instead of using what's configured in the registry.
I believe the problem is here (line 98 of xymonclient.ps1):
if ((get-variable -erroraction SilentlyContinue "clientname") -eq $null -or $script:clientname -eq "") {
$ipProperties = [System.Net.NetworkInformation.IPGlobalProperties]::GetIPGlobalProperties()
$script:clientname = $ipProperties.HostName
if ($script:XymonSettings.clientfqdn -and ($ipProperties.DomainName -ne $null)) {
$script:clientname += "." + $ipProperties.DomainName
}
if ($script:XymonSettings.clientlower) { $script:clientname = $clientname.ToLower() }
}
The problem is the if statement above interrogates $script:clientname, instead of $script.Xymonsettings.clientname.
g
---
Glauber Ribeiro
Experian Automotive, Schaumburg IL
Infrastructure and Information Security
e: user-59d088777028@xymon.invalid
p: XXX-XXX-XXXX f: XXX-XXX-XXXX