No Hosts in IcingaWeb2

Hello there,

I’m new to Icinga an want to set up an Icinga2 with IcingaWeb2 and Icinga-Director.

I’ve got the Icinga2 up & running, but my IcingaWeb2 did not show any Hosts. Neither the localhost, which should be in there by default.

Could someone give me a hint, what i’ve done wrong?

icinga2 - The Icinga 2 network monitoring daemon (version: 2.11.2-1)

Platform: SLES
Platform version: 12-SP4
Kernel: Linux
Kernel version: 4.12.14-94.41-default
Architecture: x86_64

DB MariaDB 10.2.18

Icinga Web 2 2.7.3
PHP Version 7.2.24

MODULE VERSION
director master
doc 2.7.3
incubator 0.5.0
incubator.odl v0.1.1
ipl v0.3.0
ipl.odl v0.1.1
monitoring 2.7.3
reactbundle 0.7.0
translation 2.7.3
vspheredb master

to avoid misunderstandings:
Do you want to know why you don’t see the hosts (like written in the text) or why the icinga-director.service failed (like written in the title)? Because normally this are diffrent things

Sooorry, the director is my next problem, but now in this topic I want to see my hosts.
I’ve just edited the title… :slight_smile:

Could you Show us the Output of “icinga2 daemon -C”?

And it would be also useful to know where you wrote the hosts you’re are missing? text file? director?

Hi,

maybe you used the node-wizard and removed conf.d from icinga2.conf. So there is no default configuration anymore.

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"
include_recursive "conf.d" include_recursive "conf.d"

[2019-10-30 16:01:12 +0100] information/cli: Icinga application loader (version: 2.11.2-1)
[2019-10-30 16:01:12 +0100] information/cli: Loading configuration file(s).
[2019-10-30 16:01:12 +0100] information/ConfigItem: Committing config item(s).
[2019-10-30 16:01:12 +0100] information/ApiListener: My API identity: lxrhe141
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 1 NotificationComponent.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 1 LivestatusListener.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 1 GraphiteWriter.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 1 IdoMysqlConnection.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 1 StatusDataWriter.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 1 ExternalCommandListener.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 1 CheckerComponent.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 3 ServiceGroups.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 1 ScheduledDowntime.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 1 User.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 1 UserGroup.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 3 TimePeriods.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 3 Zones.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 11 Services.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 12 Notifications.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 2 NotificationCommands.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 1 IcingaApplication.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 1 Endpoint.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 2 HostGroups.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 1 Host.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 1 Downtime.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 235 CheckCommands.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 1 FileLogger.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 2 ApiUsers.
[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 1 ApiListener.
[2019-10-30 16:01:12 +0100] information/ScriptGlobal: Dumping variables to file ‘/var/cache/icinga2/icinga2.vars’
[2019-10-30 16:01:12 +0100] information/cli: Finished validating the configuration file(s).

ok, the daemon sees one host in your config:

[2019-10-30 16:01:12 +0100] information/ConfigItem: Instantiated 1 Host.

If you include the the conf.d Directory, maybe it must be this one.
So try to disable this Directory.

Here you can also find some hints: https://icinga.com/docs/icinga2/latest/doc/15-troubleshooting/
With this Guideline you can also try to look at wat your icinga2 has loaded. e.g. with the command

icinga2 object list

If you see the host in the config, but icingaweb2 does not see it, it could be a problem with the ido database. If icinga cant write to the database or the ido feature is not enabled you would not see the host in icingaweb2. Maybe check if the host is inside the database.

1 Like