Apply rules for host objects?

It would be helpful if someone can tell me if its possible and how to setup a host object with some form of statement or ‘apply rule’ so that during icinga startup it can select host objects to ignore or include based on a rule.

Something like:

object Host “adnwk01” {
address = “”
check_command = “hostalive”
apply where nodename == “

This way I can easily push out all my config’s to each of my three Icinga2 servers and have each server evaluate all the config’s and know which one to look at or ignore based on this rule or statement.

apply cannot be used for host objects.

1 Like

I think you need to check on host templates in the documentation.


Hmmm are you configuring Icinga with the static configuration files, or are you using or planning to use the Icinga Director? I may have a suggestion but that only works with static config files.


Currently we are using static config files for configuration.

Thanks yes I gathered, but was hoping by example there may be another language construct available for host objects that effectively could act like that.