Page 1 of 1

Re: [Nagios-devel] Empty Hostgroup Error

Posted: Mon Jul 14, 2008 11:21 am
by Guest
Hi Caylan,

what you mentioned, is a common problem in a distributed Nagios
environment. This can get very complex not only with hostgroups.

We solved this problem, at least we tried to solve it this way:

Nearly all configuration objects are found under, except objects which
have no dependencies on others like commands.

/etc/nagios/objects/repository

There you find a directory for every object type.

/etc/nagios/objects/repository/hosts
/etc/nagios/objects/repository/services
/etc/nagios/objects/repository/hostgroups
...

For every Nagios host there is a directory beyond

/etc/nagios/objects/repository

For example your Nagios hosts are called nms001, dms001 and dms002.
You have the following directory structure. The first one for the
central monitoring system is a symbolic link to the repository itself.

/etc/nagios/objects/nms001 -> /etc/nagios/objects/repository
/etc/nagios/objects/dms001
/etc/nagios/objects/dms002

Beyond the directories for the distributed monitoring systems there is
a structure like described above.

/etc/nagios/objects/dms001/hosts
/etc/nagios/objects/dms001/services
/etc/nagios/objects/dms001/hostgroups
...

Beyond we have symbolic links to the real configuration files, e.g.
for the host proxy

/etc/nagios/objects/dms001/hosts/proxy.cfg ->
/etc/nagios/objects/repository/hosts/proxy.cfg

If you have such a structure you are able to check configuration
consistency for each Nagios system before you rsync the configuration
files to the Nagios systems. Your rsync script can be really simple,
e.g. with exclude lists, because you are able to sync all and
reference different directories in Nagios main configuration file.

We have more than 1000 configuration files here. Maybe you want to
give this schema a try.

Anybody else? Any comments appreciated.

Tobias





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]