[icinga-users] Service inheritance

Simon Oosthoek soosthoek at nieuwland.nl
Wed Mar 13 20:42:03 CET 2013

On 03/13/2013 05:32 PM, Michael Friedrich wrote:
> On 13.03.2013 16:46, Simon Oosthoek wrote:
>> Another way might be to define a custom variable (macro) in the host
>> definition that is later used in the generic service definition to set
>> host specific parameters. I suppose this means you have to set the
>> custom macro in all host definitions or their ancestor. see
>> http://docs.icinga.org/latest/en/customobjectvars.html#basicscustomvars
> no. custom var macros are interpreted on runtime. not on config read and
> object processing and resolving the final attributes. so i am not
> entirely sure what your idea is here, but the approach will fail.

Perhaps my choice of words was wrong, but I think I'm using this 
already: (In nagios 3.0.5, haven't tried the same on icinga yet)

define host{
         use                     debian-dom0-host
         host_name               minerva
         parents                 bit2-switch01
         _WARNVMS                28
         _CRITVMS                31

define host{
         use                     debian-dom0-host
         host_name               vulcan
         parents                 bit1-switch02
         _WARNVMS                25
         _CRITVMS                31

And then

define service{
         use                             generic-service,srv-pnp
         hostgroup_name                  debian-dom0
         service_description             Xen VMs

Admittedly, this could probably be better/just as well done using a 
local thing in nrpe.cfg in the command definition, but at the time I 
thought this was an interesting way to try.

I think this works as expected, but please correct me if it's by 
accident ;-)


More information about the icinga-users mailing list