Connecting services and hosts in Icinga2

Posted on

To minimize overall configuration text it might be convenient to list all host services in the same block where the host is defined. The “apply for ” construct allows to di such thing. For example:   object Host “myhost.com” { import “generic-host-template” address = “myhost.com” vars.ipmi_address = “myhost-mgmt.com” vars.ipmi_config = “/usr/local/etc/freeipmi/ipmi_myhost.cfg” vars.service.https[“Myhost web”] = {port=8443} […]