Host.cfg - Parent relationship

Hi,
I’ve configured a whole bunch of host.cfg files for hosts that belong to a similar function, ie Unix.cfg is for all unix servers, NT.cfg for Windows servers. Within the cfg I can configure the parent dependancy that the host has.

The parent is another host.cfg, ie lanhost.cfg but instead of being able to reference the lanhost.cfg within Unix.cfg, I have to list out each host within the lanhost.cfg this being lanswitch1 and lanswitch2.

e.g. This works
define host {
host_name Unix1
alias Unix1.mynet

parents lanswitch1, lanswitch2

This doesn’t seem to work
define host{
host_name Unix1
alias Unix1.mynet

parents lanhost

It seems that this is duplication handling.
I have to define the hosts for the lanswitch.cfg and then redefine it again for the parent within Unix.cfg.
If any host is added or changed to lanswitch.cfg, I have to remember to update it in all locations that uses it as a parent reference rather than in just the one location, lanswitch.cfg.
It just seems odd to have to do it this way and I can’t find references to this in the manual.

Could someone clarify if I have done this the wrong way around and they have managed to have
TIA

A have no idea what you are doing. But the way I do it is exactly the way it is in the physical realities of the host.
I define a parent as “what is it connected too?”.
So, the box sitting on the network running a ftpd service that we wish to monitor will have a host parent of:
BoxA-eth0 (yes the ethernet card itself)
and it’s parent is:
SwitchA-port12 (yes, I"ve defined a host which is port 12 on SwitchA and has a host check of check_icmp and a service check of check_snmp(which checks the ifOperstatus)).
and it’s parent is:
SwitchA
and it’s parent is:
SwitchA-port25
and it’s parent is
routerA-port1
and so on.
The reason for this, is because not only am I interested in the HostA ftpd service, but the network also. I want to find the blocking switch/port/cable/router problem in 5 minutes, not 2 hours.

So, my nagios status map looks exactly like a schematic drawing of the actual physical connectivity of our network. If yours does not, then I ask, why not?