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 202 forks source link

Blacklist service based on host variable #1725

Open swizzly opened 5 years ago

swizzly commented 5 years ago

Hi It is rather a feature request: it would be great if services could be blacklisted based on some filter or value of a host variable.

We create hosts based on templates that cover 95% of the cases, 5% of the hosts have a slight difference, that makes the usage of a specific service impossible. It would be nice if this problematic service could be blacklisted based on some attribute of the host.

I am aware of that this is not so critical and rather a nice to have feature, as one can create more differentiated templates, or assign the problem service not from the template but via assing rules to the hosts.

Cheers

Thomas-Gelf commented 5 years ago

A recently added feature is that you are now allowed to use host.templates contains "Linux Server" in your Apply Rules. This allows to mix Inheritance-based assignments with other rules. Could this help to solve you problem? In case you already have quite some Service-Templates directly bound to single Host Templates, we could eventually add a "Transform into an Apply Rule" Action, making the transition easier.

swizzly commented 5 years ago

That is cool, thank you! I used it now for some other cases, but unfortunately, in this case it does not help to keep the config simple. Unless it would be possible to assign a service to the high level template and exclude some specific templates by using something like "!contains". I tried it and I found two Problems: