Bug in Nagios 2.6 regarding multiple hostgroups lines in services.cfg

Andreas Ericsson ae at op5.se
Tue Jan 16 14:47:51 CET 2007


Ian Forde wrote:
> Hi all -
> 
> I've noticed that you can have multiple "members" lines in the
> hostgroups.cfg hostgroup entries.  Unfortunately, while rewriting a
> fairly large Nagios configuration to support Distributed monitoring, I
> separated out our services.cfg lines to have multiple "hostgroups" lines
> for a given services.  This quite neatly broke the config, as it seems
> that it only reads the last hostgroups line listed for a given service.
> 
> Any chance of a fix?
> 


I'm not sure if this is a bug or by design. I believe "members" was 
treated specially because those lines tended to grow very, very large. 
Everywhere else the last specified option takes precedence.


define service{
	hostgroups	foo
	hostgroups	bar
}

will assign this service to hostgroup "bar" only.

define service{
	hostgroups	foo,bar
}

will assign this service to hostgroups "foo" and "bar".

Some fairly simple perl/python/php/ruby/manual hackery should work famously.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list