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

Inherited values and overwrites not shown in director on all inheritance levels #1190

Open bcogel opened 7 years ago

bcogel commented 7 years ago

In a setup with a complex template hierarchy, inherited values and overwrites are not clearly shown in director forms on all levels. Inheritance works, but when modifying a host, one sometimes has to guess, which values are really inherited. Or take a look into the deployed configuration.

Expected Behavior

See all inherited values in the director forms when modifying an object.

Current Behavior

Simple example: Notifications

notification templates tree:

generic-notification (dummy entry, only interval defined)
- generic-host-alarm (defines period, delay, state and change filters)
-- notification-host-by-mail (defines notification command)
- generic-service-alarm (defines period, delay, state and change filters)
-- notification-service-by-mail (defines notification command)

notification-host-by-mail and notification-service-by-mail show the inherited values for interval, period, and delay. The inherited state and change filters are not shown. Only the resolved preview shows the configured values. And those filters don't show up in the defined notifications.

Complex example:

external command disk (defines defaults for disk_cfree, disk_wfree, disk_inode_cfree, disk_inode_wfree)
- serviceset linux-generic (uses disk with name DISK and inherits and shows those values)
-- hosttemplate generic-linux (uses serviceset linux-generic and inherits and shows values)
--- hosttemplate linux-rhel (inherits generic-linux, disk_cfree, disk_wfree, disk_inode_cfree are overwritten with new values, defaults for disk_ignore_ereg_path and disk_ereg_path are defined)
---- hosttemplate linux-rhel-sys (inherits linux-rhel)

In linux-rhel-sys director DISK shows only the original values from the external command. Inherited values show up in host_templates.conf

    vars["_override_servicevars"] = {
        DISK = {
            disk_cfree = "5%"
            disk_eregi_path = [ "sda1", ".*_vg" ]
            disk_ignore_ereg_path = [ "vicep.*", "TSM", ".*lv_imap.*" ]
            disk_inode_cfree = "5%"
            disk_inode_wfree = "10%"
            disk_wfree = "10%"
        }
    }

Btw.: What happens when I overwrite an array type variable with inherited values in such a setup in director. Will the new value be added or will it overwrite the complete definition? Never tried...until now...

It overwrites all previously defined values.... I don't think that this is a good result...

Possible Solution

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Context

Your Environment

sahnd commented 7 years ago

+1

Reproducible with 76ac1e1