Icinga / icingaweb2-module-director

The Director aims to be your new favourite Icinga config deployment tool. Director is designed for those who want to automate their configuration deployment and those who want to grant their “point & click” users easy access to the configuration.
https://icinga.com/docs/director/latest
GNU General Public License v2.0
412 stars 202 forks source link

Services applied via Service Set are not shown in Director/Hosts/Services #1734

Open binarygraka opened 5 years ago

binarygraka commented 5 years ago

Expected Behavior

When browsing the Services tab of a host, I would imagine to see all the services, that have been applied via a service set to this host. I could then blacklist individual services.

Current Behavior

When browsing the Services tab of a host, no services are shown, although the service set is applied to this host and the checks are also executed by Icinga2. Similar to #753.

Interestingly: The Services applied via service sets are correctly shown for some hosts, and for some not.

Your Environment

Please let me know if I can debug something, show database or additional configuration. Thanks!

lazyfrosch commented 5 years ago

Could you please supply some configuration examples?

From your description I have no place to start investigating, it works for me:

bildschirmfoto von 2018-12-12 10-35-58

binarygraka commented 5 years ago

Sure. It does not work, for example, for my Windows Servers. I have the following ServiceSet Windows Server Base, consisting of 16 services:

windows_server_base

As can be seen, the service set gets applied when host.vars.os = *Windows* and host.vars.slow is false (or not set). I then have around 50 Windows Server hosts. Let's take one of them named adm.testhost.local:

host

As can be seen, the Operating System contains Windows and the flag Slow Client is not set. When I change to the Services tab, however, no service out of this service set consisting of 16 services is shown:

service_set

However, if I check the services of the host under Overview -> Hosts, I can see that all the services were successfully applied and executed.

This behaviour appears with all hosts that use the ServiceSet Windows Server Base. On the other hand, when reviewing a Centos 7 host for example, the services (applied via the service set) are correctly shown in the Services tab of the host in the director.

What I furthermore experienced, is, that the Applied groups are sometimes not shown at all, or even a wrong group is shown. However, when checking Overview -> Hostgroups, everything is displayed correctly. It seems that there is something messed up with my Director installation and/or Director database.

For example: I have two hostgroups, Windows and CentOS, depending on the operating system. Regarding a few hosts, where the operating system is Microsoft Windows Server 2016 (64-bit), the Applied group CentOS is displayed, which is clearly wrong.

lazyfrosch commented 5 years ago

I've seen this once before, the problem should be caused by the boolean filter.

The internal resolver in Director doesn't handle this correctly...