Self Service API - Display Name

Hi All,

I’ve managed to get my hosts to self register using the PowerShell framework and self service API. However when they are created the Display Name is always the FQDN and the Host Name is always the FQDN minus the Domain.

Is there anyway to change this or set the Display Name via the self service API / framework scripts?

Thanks
Ash

1 Like

Hi @Figment!
I guess I’m having the same problem - see post Icinga PowerShell Framework - Using hostname as display_name (without domain)

For us the hostname is correctly set to FQDN (as set in the host template “Self Service API - Global Settings”).
Unfortunately the field display_name is not set at all which should be the local part of the hostname (i.e. without the domain part).
As long as we’ve used the old “PowerShell Module” (deprecated) the display_name variable was automatically set to the shortname.

We’re currently using the following parameters with PowerShell Framework:

	$AgentInstallParams = @{
			"SelfServiceAPIKey" = $SelfServiceAPIKey;
			"UseDirectorSelfService" = 1;
			"lowercase" = 1;
			"DirectorUrl" = 'http://icingamaster1.domain.net/icingaweb2/director';
			"OverrideDirectorVars" = 0;
			"ConvertEndpointIPConfig" = 0;
			"CAEndpoint" = "icingamaster1.domain.net";
			"CAPort" = 5665;
			"Ticket" = '';
			"EmptyTicket" = 1;
			"AgentVersion" = $appVersion;
			"Endpoints" = $ParentEndpoints;
			"ParentZone"  = $ParentZone;
			"AllowVersionChanges" = 1;
			"InstallFrameworkPlugins" = 1;
			"InstallFrameworkService" = 0;
			"PluginsUrl" = "$dirFiles\icinga-powershell-plugins-1.3.0.zip";
			"PackageSource" = "$dirFiles";
			"ServiceUser" = "LocalSystem"
			}
	 
	Start-IcingaAgentInstallWizard @AgentInstallParams -RunInstaller

How do others manage the display name with Icinga Director API?
Is it necessary to create a feature request for PowerShell Framework?

Regards,
AlexR

There is a feature request for PowerShell Framework on Github that was added to the v1.6.0 milestone.

see: Setting a host display name (display_name) when using IcingaAgentInstallWizard not possible · Issue #292 · Icinga/icinga-powershell-framework · GitHub

1 Like