I have installed Icinga2 on RHEL 7.8 Maipo.
Agentless monitoring is configured and lauched succesfully under /etc/icinga2/conf.d.
However, when it comes to switching to agent based monitoring (with target approach combining both) i get 139 error code when trying to start icinga2.service - every time API is enabled.
What i did, is launched node wizard for master:
Master zone name [master]: agentbased
Default global zones: global-templates director-global
Do you want to specify additional global zones? [y/N]: n
Do you want to disable the inclusion of the conf.d directory [Y/n]: y
My config:
1. icinga2 daemon -C :
(there are warnings for 2 directories i initally created but later deleted under /etc/inga2/zones.d.
icinga2 - The Icinga 2 network monitoring daemon (version: 2.11.4-1)
Copyright (c) 2012-2020 Icinga GmbH (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
System information:
Platform: Red Hat Enterprise Linux Server
Platform version: 7.8 (Maipo)
Kernel: Linux
Kernel version: 3.10.0-1127.13.1.el7.x86_64
Architecture: x86_64
Build information:
Compiler: GNU 4.8.5
Build host: runner-ltrjqz9n-project-322-concurrent-0
Application information:
General paths:
Config directory: /etc/icinga2
Data directory: /var/lib/icinga2
Log directory: /var/log/icinga2
Cache directory: /var/cache/icinga2
Spool directory: /var/spool/icinga2
Run directory: /run/icinga2
Old paths (deprecated):
Installation root: /usr
Sysconf directory: /etc
Run directory (base): /run
Local state directory: /var
Internal paths:
Package data directory: /usr/share/icinga2
State path: /var/lib/icinga2/icinga2.state
Modified attributes path: /var/lib/icinga2/modified-attributes.conf
Objects path: /var/cache/icinga2/icinga2.debug
Vars path: /var/cache/icinga2/icinga2.vars
PID path: /run/icinga2/icinga2.pid
3. /etc/icinga2/icinga2.conf :
include "constants.conf"
include "zones.conf"
include <itl>
include <plugins>
include <plugins-contrib>
include <manubulon>
include <windows-plugins>
include <nscp>
include "features-enabled/*.conf"
// Disabled by the node setup CLI command on 2020-08-28 13:58:37 +0000
// include_recursive "conf.d"
// Added by the node setup CLI command on 2020-07-30 09:38:56 +0000
include "conf.d/api-users.conf"
Would highly appreciate any tip for which direction to search
/*
* Generated by Icinga 2 node setup commands
* on 2020-08-28 13:58:32 +0000
*/
object Endpoint "linuxserver.domain.com" {
}
object Zone "agentbased" {
endpoints = [ "linuxserver.domain.com" ]
}
object Zone "global-templates" {
global = true
}
object Zone "director-global" {
global = true
}
cat /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 = "/usr/lib64/nagios/plugins"
At least NodeName and ZoneName is missing in your constants.conf. Example:
/**
* 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 = "icinga.example.com"
/* Our local zone name. */
const ZoneName = "icinga.example.com"
/* Secret key for remote node tickets */
const TicketSalt = "***"
I am sorry, didnt paste full constant.conf previously, it should be:
/**
* 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/lib64/nagios/plugins"
/* The directory which contains the Manubulon plugins.
* Check the documentation, chapter "SNMP Manubulon Plugin Check Commands", for details.
*/
const ManubulonPluginDir = "/usr/lib64/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/lib64/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 = "linuxserver.domain.com"
/* Our local zone name. */
const ZoneName = "agentbased"
/* Secret key for remote node tickets */
const TicketSalt = "***"
Only two ideas left from my side: Check your certificates as described here. And check if the hostname is properly resolved e.g. /etc/hosts or nameserver.
Did another test icinga2 server installation on Ubuntu 20.04 laptop and everything seems fine.
Will try to connect another Windows laptop as client over Wifi on Monday
One thing wonders me, if node wizard has a choice to disable conf.d, then how icinga gets the api-users details then?
I reinstalled icinga on Red Hat (removed all icinga* pkgs + removed /etc/icinga2 directory),
And, after reinstallation & master node wizard setup - again got the 139 error code.
But after api feature flop (off-on) service finally started running.
However, comparing to the healthy Ubuntu server, i cannot see any process listening on 5665, therefore any client installation cannot connect