Defining parents


Hello everyone…

I am trying to define parent switches…
So my question is… Does the parent and child information have to reside in one CFG file or could they be in multiple files within a folder and
could they be in multiple folders in multiple files.


Nagios is contacting proxy…through switch 1 and 2…


define host {
host_name proxy

parents switch2

define hosts {
host_name switch2

parents switch1

define hosts {
host_name switch1



I get an error when I restart nagios with a similar configuration. I am creating seperate .cfg file within the same folder for each switch.

So my question is do all the configuration have to reside inside the same text file for all parents and child. Or if I do multiple cfg files how do I get them to communicate


it can be in whatever file or directory you want, as long as the files get loaded as indicated in nagios.cfg :slight_smile:


Does the sample configuration look ok.
Not sure why it errors out…when nagios is restarted…



try runnning nagios in config verify mode.
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/objects/nagios.cfg


There are some information that is required to be in a define host directive. See Nagios Documentation for details on which - make sure you have the required directives defined either in the host defininition, or using a host template. Also the last 2 hosts you defined - the directive is wrong - it is define host ,not define hosts.


Could you point me to the section or link in the documentation that talks about defining parents in 3.0


#7 … ility.html

To anyone who comes across this… I had a very interesting time understanding this… The above is not one file… It it the output of multiple files placed in one file. If you look at the link below you will have a better chance understanding this. … .html#host