Fatal: Failed to install Icinga 2 Agent

(windows server 2012R2)
I’ve created a powershell script that that installs agent based on some parameters that i define in some variables upfront.

it works fine on some windows 2012R2 servers but fails on other windows 2012R2 servers with errormsg “Fatal: Failed to install Icinga 2 Agent”

i manually checked all parameters and they all seems to be fine (including ticket)

script i run :

Icinga2AgentModule -RunInstaller -agentname $fqdn -InstallAgentVersion $RequestedIcingaVersion
-ParentEndpoints $ParentEndpoints -ParentZone satellite -CAServer $CAServer -Ticket $ticketvalue -downloadurl c:\icinga -AllowUpdates -installnsclient

error msg i get

Notice: Started script run…
Notice: Trying to fetch Host IP-Address for hostname: servername.domain.com
Notice: Setting IP 999.999.999.999 as primary IP for this host for all requests. Access it with &ipaddress& for all JSON requests.
Notice: Using Icinga version “”, setting certificate directory to “C:\ProgramData\icinga2\etc\icinga2\pki”
Warning: Icinga 2 Agent does not seem to be installed on the system
Notice: Installing Icinga 2 Agent from local directory
Warning: Icinga 2 Agent Installer verification disabled.
Notice: Installing Icinga 2 Agent
Fatal: Failed to install Icinga 2 Agent.
Notice: Using Icinga version “”, setting certificate directory to “C:\ProgramData\icinga2\etc\icinga2\pki”
Warning: Icinga 2 Agent does not seem to be installed on the system
Warning: Unable to generate Icinga 2 certificates. Icinga 2 executable not found. It looks like the Icinga 2 Agent is not installed.
Warning: Configuring Icinga 2 Agent without ApiListener, as certificates have not been generated.
Warning: Unable to write Icinga 2 configuration. The required directory was not found. Possibly the Icinga 2 Agent is not installed.
Warning: Icinga 2 config validation not possible. Icinga 2 executable not found. Possibly the Agent is not installed.

Hi,

since Icinga 2 v2.11.0 it is necessary to have at least .NET 4.6 installed on Windows hosts. Windows Server 2012 R2 comes with .NET 4.5.1 by default, please ensure you have .NET 4.6 installed on the hosts where it is not working.

If this is not the problem try to install the MSI directly without a script and see if there is a more verbose error message.

Best regards
Michael

2 Likes

Did you create the complete PowerShell Script on your own or is it based on the Kickstart script https://github.com/Icinga/icinga2-powershell-module?

You could also take a look at https://github.com/Icinga/icinga-powershell-framework. This is new and was presented at the OSMC

2 Likes

@stevie-sy,

yes i used complete PowerShell Script

@mcktr Michael Insel,

my server had .NET 4.5. After upgrading to 4.6 it worked fine.
thx for your help

Willem

1 Like