hostgroup with no members - Enhancement

Andreas Ericsson ae at op5.se
Tue Nov 2 16:11:52 CET 2010


On 11/02/2010 03:56 PM, Daniel Wittenberg wrote:
> Maybe it could just be considered a warning and not a fatal error?  I
> can ignore warnings :)
> 

Yes and no. The code returns NULL for non-existing hostgroups referenced
(which should remain an error) and NULL for existing hostgroups without
member hosts. It needs to be changed to return an int and pass the data
back as an out-argument, and I simply don't have time to do that just
now.

So yes, it could be considered an error, and no that won't happen in
the foreseeable future unless someone else sends me a patch for it. I'd
be delighted to apply such a patch if someone did though, and especially
if it was configurable from nagios.cfg whether empty hostgroups
referenced from services was an error or just a warning, with error
enabled by default.

The patch must not change the object layouts as defined in
include/objects.h.

Backwards compatibility is kinda boring to cater to, but it's necessary
for projects as large as Nagios.

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

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
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