icingaweb2-module-director icon indicating copy to clipboard operation
icingaweb2-module-director copied to clipboard

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

Open Rasp8e opened this issue 7 years ago • 4 comments

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://<icinga_server>/icingaweb2/director/host/appliedservice?name=<host_name>&service_id=<Known_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

Rasp8e avatar Jul 16 '18 11:07 Rasp8e

Seeing the same issue

pemontto avatar Jul 24 '18 09:07 pemontto

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.

CodingMush avatar Sep 04 '18 18:09 CodingMush

We should investigate this

Thomas-Gelf avatar Sep 05 '18 21:09 Thomas-Gelf

I see the same problem.

/ref/NC/558885

widhalmt avatar Sep 13 '18 16:09 widhalmt