Empty Hostgroup Error

Caylan Van Larson i at caylan.net
Tue Jul 15 01:01:22 CEST 2008


Tobias,

Thanks for the email.

Symlinks... I confess, I've done the exact same thing before.

Nagios needs two things:
	1) graceful handling of empty hostgroups (the bulk of my worries)
		and
	2) actively monitor hosts based on a nagios instance name

As for the latter (2) each Nagios instance could be named and a  
configuration option (host and inheritable to service) named  
active_instance would dictate active vs. passive monitoring.  Ideally  
this variable could be "subscribed" to using hostgroups.  Perhaps  
someone with a more delicate Nagios vocabulary can understand what I'm  
trying to say and translate :)

Let me demonstrate this fantasy.

define hostgroup{
         hostgroup_name	MSP_
         alias           		Servers in Minneapolis
	instance_name	MSP
}

define hostgroup{
         hostgroup_name	NYC_
         alias           		Servers in New York
	instance_name	NYC
}

define host {
         use				default
         host_name		myhost
         alias			Development WAS
         hostgroups 		NYC_,Linux
}

define service {
	use				load
   	hostgroup_name	Linux
}

This simple configuration would only be actively checked by the NYC  
nagios host, and be passively checked by the MSP host.  Eh?


---

Caylan



On Jul 14, 2008, at 2:21 PM, Tobias Mucke wrote:

> 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
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/




More information about the Developers mailing list