Okay thanks.
Thats not working on my Windows Agent.
wether in powershell or in cmd there is no command like “icinga” or smth.
The icinga2 Service is running.
I have uninstalled the icinga software from agent and deleted the icinga2 folder under %ProgrammData%
Now im installting again the Icinga2-v2.13.7-x86_64.msi
And signed the certificate request on the master via. icinga2 ca sign ID
Event Log on agent says now:
warning/ApiListener: Unexpected certificate common name while connecting to endpoint 'master': got 'hostname.fqdn'
information/ApiListener: Finished reconnecting to endpoint 'master' via host 'hostname.fqdn' and port '5665'
He is reconnecting every 2 min…
(At least he now uses the right FQDN and not the old Domain 
Shared agent data below:
C:\ProgramData\icinga2\etc\icinga2\zones.conf
object Endpoint "master" {
host = "mastername"
port = "5665"
}
object Zone "master" {
endpoints = [ "master" ]
}
object Endpoint "agentname" {
}
object Zone "agentname" {
endpoints = [ "agentname" ]
parent = "master"
}
object Zone "global-templates" {
global = true
}
object Zone "director-global" {
global = true
}
Is equal to master.
C:\ProgramData\icinga2\etc\icinga2\icinga2.conf
/**
* Icinga 2 configuration file
* - this is where you define settings for the Icinga application including
* which hosts/services to check.
*
* For an overview of all available configuration options please refer
* to the documentation that is distributed as part of Icinga 2.
*/
/**
* The constants.conf defines global constants.
*/
include "constants.conf"
/**
* The zones.conf defines zones for a cluster setup.
* Not required for single instance setups.
*/
include "zones.conf"
/**
* The Icinga Template Library (ITL) provides a number of useful templates
* and command definitions.
* Common monitoring plugin command definitions are included separately.
*/
include <itl>
include <plugins>
include <plugins-contrib>
include <manubulon>
/**
* This includes the Icinga 2 Windows plugins. These command definitions
* are required on a master node when a client is used as command endpoint.
*/
include <windows-plugins>
/**
* This includes the NSClient++ check commands. These command definitions
* are required on a master node when a client is used as command endpoint.
*/
include <nscp>
/**
* The features-available directory contains a number of configuration
* files for features which can be enabled and disabled using the
* icinga2 feature enable / icinga2 feature disable CLI commands.
* These commands work by creating and removing symbolic links in
* the features-enabled directory.
*/
include "features-enabled/*.conf"
/**
* Although in theory you could define all your objects in this file
* the preferred way is to create separate directories and files in the conf.d
* directory. Each of these files must have the file extension ".conf".
*/
// Disabled by the node setup CLI command on 2023-05-09 12:32:16 -0000
// include_recursive "conf.d"
Is equal to master except include_recursive "conf.d"
this is on the master icinga2.conf not commented out.
C:\ProgramData\icinga2\etc\icinga2\constants.conf
/**
* This file defines global constants which can be used in
* the other configuration files.
*/
/* The directory which contains the plugins from the Monitoring Plugins project. */
const PluginDir = PrefixDir + "/sbin"
/* The directory which contains the Manubulon plugins.
* Check the documentation, chapter "SNMP Manubulon Plugin Check Commands", for details.
*/
const ManubulonPluginDir = PrefixDir + "/sbin"
/* The directory which you use to store additional plugins which ITL provides user contributed command definitions for.
* Check the documentation, chapter "Plugins Contribution", for details.
*/
const PluginContribDir = PrefixDir + "/sbin"
/* Our local instance name. By default this is the server's hostname as returned by `hostname --fqdn`.
* This should be the common name from the API certificate.
*/
const NodeName = "agentname"
/* Our local zone name. */
const ZoneName = "agentname"
/* Secret key for remote node tickets */
const TicketSalt = ""
The constants.conf on the master looks different:
/**
* This file defines global constants which can be used in
* the other configuration files.
*/
/* The directory which contains the plugins from the Monitoring Plugins project. */
const PluginDir = "/usr/lib/nagios/plugins"
/* The directory which contains the Manubulon plugins.
* Check the documentation, chapter "SNMP Manubulon Plugin Check Commands", for details.
*/
const ManubulonPluginDir = "/usr/lib/nagios/plugins"
/* The directory which you use to store additional plugins which ITL provides user contributed command definitions for.
* Check the documentation, chapter "Plugins Contribution", for details.
*/
const PluginContribDir = "/usr/lib/nagios/plugins"
/* Our local instance name. By default this is the server's hostname as returned by `hostname --fqdn`.
* This should be the common name from the API certificate.
*/
const NodeName = "master"
/* Our local zone name. */
const ZoneName = "master"
/* Secret key for remote node tickets */
const TicketSalt = "0e5360425021b49443555037c06eb9a6"