When you use multiple inheritance sources, Nagios will use the variable/value from the first source that is specified in the use directive.
On Wed, Nov 16, 2011 at 2:13 AM, Anders Kvist <and...@kvistmail.dk> wrote: > Hey > > I have tried to use object inheritance in my nagios config, but a few > things are bugging me: > > I have a linux-server which uses generic-server and sets up default > settings for all my linux servers. I have some templates for tasks, in > this case: storage, kvm and hardware. They only add the hostgroup (and > gets services this way) and have some custom variables. Here is an example: > > define host{ > name storage-server > hostgroups +storage-servers > register 0 > > __PROCS_WARN 500 > __PROCS_CRIT 750 > } > > A kvm host is defined with 'use linux-server,kvm-server,hardware-server' > and storage host with 'use linux-server,storage-server,hardware-server'. > Here is an example of a storage host: > > define host{ > use linux-server,storage-server,hardware-server > host_name storage01.domain.tld > alias storage01 > address xxx.xxx.xxx.xxx > } > > > Hostgroups work fine (even tough the lists of hostgroups on a host in > the webinterface isn't in the same order as the use-line), but custom > variables doesn't. I have a __PROCS_WARN and __PROCS_CRIT in > linux-servers with a default number of max processes before warning and > critical - this needs to be overwritten for kvm-server and > storage-server, because they have more processes - but the one from > linux-server is used in both cases... > > What do I need to do to make this work as expected? > > /Anders > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > Nagios-users mailing list > Nagios-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-users > ::: Please include Nagios version, plugin version (-v) and OS when reporting > any issue. > ::: Messages without supporting info will risk being sent to /dev/null > ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null