Empty Hostgroup Error

Tobias Mucke tobias.mucke at googlemail.com
Mon Jul 14 21:21:36 CEST 2008


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

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08




More information about the Developers mailing list