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
413 stars 203 forks source link

Service not showing as applied if assign where depends on host.vars #1571

Open Rasp8e opened 6 years ago

Rasp8e commented 6 years ago

Expected Behavior

If a service is applied based on a custom variable, the service should be shown in director for the hosts where it is applied under Services Tab.

Current Behavior

When the assign where rule is based on host properties the bahaviour is correct and we can see the service applied, but not when the assign rule contains host.vars

Possible Solution

Correctly check if the service should be applied for that host irrespective if it is based on a host.vars

Steps to Reproduce (for bugs)

Create a service apply rule and in the "assign where" set any a rule based on any host custom variables. Eg.: assign where (host.vars.http_port)

## WORKAROUND We can workaround currently by forcing in the URL if we know the service_apply rule ID: http:///icingaweb2/director/host/appliedservice?name=&service_id=

Eg.: http://icinga.test_server/icingaweb2/director/host/appliedservice?name=test_host1&service_id=32

Your Environment

Icinga Web 2 Version | 2.5.3 director | master grafana | 1.2.5 monitoring | 2.5.3

Running on Red Hat Enterprise Linux Server release 7.4 (Maipo) PHP Version 5.4.16 Server version: Apache/2.4.6 (Red Hat Enterprise Linux) Icinga2 version: r2.8.1-1

pemontto commented 6 years ago

Seeing the same issue

CodingMush commented 6 years ago

Same here +1

Edit: I Found a possible solution. My service set apply rule was based on host.vars.host_agent and windows-host group. windows-host got applyed by another apply rule. Threw inherit the windows-host group was not directly appled and so not shown in the director.

After directly put my groups, the service set works as aspected again.

Thomas-Gelf commented 6 years ago

We should investigate this

widhalmt commented 6 years ago

I see the same problem.

/ref/NC/558885