[Xymon] Bug report: Powershell client doesn't use configured client name

Ribeiro, Glauber glauber.ribeiro at experian.com
Tue Sep 9 18:12:18 CEST 2014


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: glauber.ribeiro at experian.com
p: 224-698-3108 f: 224-698-5032




More information about the Xymon mailing list