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