I am attempting to use Icinga for Windows + Icinga Driector self service API to deploy and register our agents on Windows endpoints in a single command.
After a lot of playing in the Icinga Powershell Framework module, I was able to find almost the complete set of values to pass to the InstallCommand
argument, except for how to enable the Checker
feature during install.
After installation, I’m finding that I need to manually enable this feature via cli call and restart the agent to get checks to work. But I am trying to achieve as much of an automated/unattended installation as possible. Does anybody know what value to pass to enable this feature during installation?
Here is my code:
[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11';
$ProgressPreference = 'SilentlyContinue';
[string]$ScriptFile = 'C:\Windows\Temp\IcingaForWindows.ps1';
Invoke-WebRequest `
-UseBasicParsing `
-Uri 'https://packages.icinga.com/IcingaForWindows/IcingaForWindows.ps1' `
-OutFile $ScriptFile;
& $ScriptFile `
-AllowUpdate `
-ModuleDirectory 'C:\Program Files\WindowsPowerShell\Modules' `
-InstallCommand '{"IfW-AgentDirectory":{"Values":["C:\\Program Files\\ICINGA2"]},"IfW-AgentUser":{"Values":["NT Authority\\NetworkService"]},"IfW-AgentVersion":{"Values":["release"]},"IfW-CAServer":{"Values":["<icinga_master>"]},"IfW-DirectorSelfServiceKey":{"Values":["<director_selfservice_key>"]},"IfW-DirectorUrl":{"Values":["https://<icinga_host>/icingaweb2/director"]},"IfW-ForceCertificateCreation":{"Selection":"0"},"IfW-GlobalZones":{"Selection":"0"},"IfW-Hostname":{"Selection":"1"},"IfW-InstallAgent":{"Selection":"0"},"IfW-InstallApiChecks":{"Selection":"1"},"IfW-InstallJEAProfile":{"Selection":"2"},"IfW-InstallPlugins":{"Selection":"0"},"IfW-InstallService":{"Selection":"0"},"IfW-ParentAddress":{"Values":{"<icinga_master>":<icinga_master>"]}},"IfW-ParentNodes":{"Values":["<icinga_master>"]},"IfW-ParentZone":{"Values":["<icinga_master>"]},"IfW-Port":{"Values":[5665]},"IfW-ServiceRecovery":{"Selection":"1"},"IfW-StableRepository":{"Values":["https://packages.icinga.com/IcingaForWindows/stable/ifw.repo.json"]},"IfW-WindowsFirewall":{"Selection":"0"},"IfW-WindowsServiceDirectory":{"Values":["C:\\Program Files\\icinga-framework-service"]}}'
Are all of the various InstallCommand
values documented anywhere? Thanks in advance.