Icinga for Windows selfservice API parameters not working


we want to install the clients with the amazing selfservice kickstart and this is working fine for standard settings.
However the ServiceUser from Icinga self Service Settings seems not to be used.
(copy paste the Powershell code from icinga director agent section )

I used Transkript and found this problem:

Remote repository "Icinga Stable" was successfully added
PS C:\windows\system32> TerminatingError(ConvertFrom-Json): "Ungültiger JSON-Primitiv: ."

Installation runs However with the default settings
And also self service API is accessible:

PS C:\windows\system32> Get-IcingaDirectorSelfServiceConfig -DirectorUrl -ApiKey 49657bee250897e432474668a03daa1585e04bf4

fetch_agent_name          : False
fetch_agent_fqdn          : True
transform_hostname        : 2
flush_api_directory       : True
resolve_parent_host       : 1
install_framework_service : 0
install_framework_plugins : 0
icinga_service_user       : LocalSystem
director_host_object      : {"address":"&ipaddress&","display_name":"&hostname.upperCase&"}
download_url              : https://packages.icinga.com/windows/
agent_version             : 2.14.2
allow_updates             : True
agent_listen_port         : 5665
installer_hashes          : {8EC21FF197E82945263F63482BD8F280FDFD4E35BD766C0B162B849EF44CD940}
IcingaMaster              :

PS C:\windows\system32>

Have you any Hint how to bring self service Api Seetings to work?

That is the command generated by Icinga Director:

[Net.ServicePointManager]::SecurityProtocol = ‘tls12, tls11’;
$ProgressPreference = ‘SilentlyContinue’;
[string]$ScriptFile = ‘C:\Users\Public\IcingaForWindows.ps1’;

Invoke-WebRequest -UseBasicParsing
-Uri ‘https://packages.icinga.com/IcingaForWindows/IcingaForWindows.ps1’ `
-OutFile $ScriptFile;

& $ScriptFile -ModuleDirectory 'C:\Program Files\WindowsPowerShell\Modules\'
-InstallCommand ‘{“IfW-DirectorSelfServiceKey”:{“Values”:[“49657bee250897e432474668a03daa1585e04bf4”]},“IfW-DirectorUrl”:{“Values”:[“"]},“IfW-StableRepository”:{“Values”:["https://packages.icinga.com/IcingaForWindows/stable”]}}’ `
-IcingaRepository ‘https://packages.icinga.com/IcingaForWindows/stable/ifw.repo.json


P.S. i also created a github issue

self service api parameter Service User ignored · Issue #696 · Icinga/icinga-powershell-framework (github.com)

Bug fixes in v1.12 See github

1 Like