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?


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" = '';
			"OverrideDirectorVars" = 0;
			"ConvertEndpointIPConfig" = 0;
			"CAEndpoint" = "";
			"CAPort" = 5665;
			"Ticket" = '';
			"EmptyTicket" = 1;
			"AgentVersion" = $appVersion;
			"Endpoints" = $ParentEndpoints;
			"ParentZone"  = $ParentZone;
			"AllowVersionChanges" = 1;
			"InstallFrameworkPlugins" = 1;
			"InstallFrameworkService" = 0;
			"PluginsUrl" = "$dirFiles\";
			"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?


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