Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

self service api parameter Service User ignored #696

Closed
tomabg opened this issue Mar 19, 2024 · 4 comments
Closed

self service api parameter Service User ignored #696

tomabg opened this issue Mar 19, 2024 · 4 comments
Assignees
Labels
Bug There is an issue present Question Further information is requested
Milestone

Comments

@tomabg
Copy link

tomabg commented Mar 19, 2024

starting kickstart with this command:

[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":["8b7078ad831d33a5cadbafbc1e4946c39b4a9196"]},"IfW-DirectorUrl":{"Values":["http://10.216.5.6/icingaweb2/director/"]},"IfW-StableRepository":{"Values":["https://packages.icinga.com/IcingaForWindows/stable"]}}' `
    -IcingaRepository 'https://packages.icinga.com/IcingaForWindows/stable/ifw.repo.json'

problem propapbly in Transcript log line 83

PS C:\windows\system32> TerminatingError(ConvertFrom-Json): "Ungültiger JSON-Primitiv: ."

PowerShell_transcript.N5X432.LYmGId2S.20240319072539.txt

self service API is usable from the client:

PS C:\windows\system32> Get-IcingaDirectorSelfServiceConfig -DirectorUrl http://10.216.5.6/icingaweb2/director/ -ApiKey 8b7078ad831d33a5cadbafbc1e4946c39b4a9196


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              : 10.216.5.6



PS C:\windows\system32>

using latest versions of the icinga server and IcingaforWindows

should be easily reproducible by starting Start-Transcript and using kickstart code from Icinga director Host-Template

@tomabg tomabg changed the title sel service api parameter Service User ignored self service api parameter Service User ignored Mar 19, 2024
@LordHepipud
Copy link
Collaborator

Thank you for the report. You mean you cant specify the Icinga Service user over the Icinga Director Self-Service API?

In case you do, this is fixed with v1.12.0: #702

@LordHepipud LordHepipud self-assigned this Mar 25, 2024
@LordHepipud LordHepipud added Bug There is an issue present Question Further information is requested labels Mar 25, 2024
@LordHepipud LordHepipud added this to the v1.12.0 milestone Mar 25, 2024
@tomabg
Copy link
Author

tomabg commented Mar 26, 2024

Thank you for the report. You mean you cant specify the Icinga Service user over the Icinga Director Self-Service API?

Yes correct

@tomabg
Copy link
Author

tomabg commented Apr 3, 2024

retest with v1.12.0 OK issue closed

1 similar comment
@tomabg
Copy link
Author

tomabg commented Apr 3, 2024

retest with v1.12.0 OK issue closed

@tomabg tomabg closed this as completed Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug There is an issue present Question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants