After installing Icinga for windows without the Self Service Api, the REST-Api daemon can't find the certificate under C:\ProgramData\icinga2\var\lib\icinga2\certs\fqdn.crt
If I register the Api Daemon with
Use-Icinga;
Unregister-IcingaBackgroundDaemon 'Start-IcingaWindowsRESTApi'
Register-IcingaBackgroundDaemon -Command 'Start-IcingaWindowsRESTApi' -Arguments @{ '-CertFile' = 'C:\ProgramData\icinga2\var\lib\icinga2\certs\fqdn.crt' };
Add-IcingaRESTApiCommand -Command 'Invoke-IcingaCheck*' -Endpoint 'apichecks';
Restart-IcingaWindowsService;
Enable-IcingaFrameworkApiChecks;
The Api Daemon starts.
Icinga for Windows log
Failed to start REST-Api daemon, as no valid provided SSL and Icinga 2 Agent certificate was found
While starting the Icinga for Windows REST-Api daemon, no valid certificate was found for usage. You can either share a valid certificate by defining the full path with -CertFile to a .crt, .cert or .pfx file, by using -CertThumbprint to lookup a certificate inside the Microsoft cert store and by default the Icinga 2 Agent certificates. Please note that only Icinga 2 Agent version 2.8.0 or later are supported
Object details:
No additional object details provided.
Expected Behavior
Certificate is found automatically
Current Behavior
No valid certificate found
See Icinga for Windows log
Possible Solution
Register daemon with -CertFile
Steps to Reproduce (for bugs)
Install latest Ifw with https://icinga.com/docs/icinga-for-windows/latest/doc/110-Installation/01-Getting-Started/#install-icinga-for-windows
Configure it manually without Self service
Sign request with icinga2 ca list && icinga2 ca sign xyz
Then restart icinga2 and icingapowershell service
Context
The windows hosts are already in Director by the vSphere DB plugin so it can't register.
Your Environment
-
PowerShell Version used ($PSVersionTable.PSVersion):
5.1.17763.2803
-
Operating System and version (Get-IcingaWindowsInformation Win32_OperatingSystem | Select-Object Version, BuildNumber, Caption):
10.0.17763 17763 Microsoft Windows Server 2019 Datacenter
After installing Icinga for windows without the Self Service Api, the REST-Api daemon can't find the certificate under
C:\ProgramData\icinga2\var\lib\icinga2\certs\fqdn.crtIf I register the Api Daemon with
The Api Daemon starts.
Icinga for Windows log
Failed to start REST-Api daemon, as no valid provided SSL and Icinga 2 Agent certificate was foundWhile starting the Icinga for Windows REST-Api daemon, no valid certificate was found for usage. You can either share a valid certificate by defining the full path with
-CertFileto a .crt, .cert or .pfx file, by using-CertThumbprintto lookup a certificate inside the Microsoft cert store and by default the Icinga 2 Agent certificates. Please note that only Icinga 2 Agent version 2.8.0 or later are supportedObject details:
No additional object details provided.
Expected Behavior
Certificate is found automatically
Current Behavior
No valid certificate found
See Icinga for Windows log
Possible Solution
Register daemon with
-CertFileSteps to Reproduce (for bugs)
Install latest Ifw with https://icinga.com/docs/icinga-for-windows/latest/doc/110-Installation/01-Getting-Started/#install-icinga-for-windows
Configure it manually without Self service
Sign request with icinga2 ca list && icinga2 ca sign xyz
Then restart icinga2 and icingapowershell service
Context
The windows hosts are already in Director by the vSphere DB plugin so it can't register.
Your Environment
PowerShell Version used (
$PSVersionTable.PSVersion):5.1.17763.2803
Operating System and version (
Get-IcingaWindowsInformation Win32_OperatingSystem | Select-Object Version, BuildNumber, Caption):10.0.17763 17763 Microsoft Windows Server 2019 Datacenter