trying to find problem in cgi/status.c

Andreas Ericsson ae at op5.se
Fri Mar 4 17:07:13 CET 2005


Matthew Kent wrote:
> On Fri, 2005-04-03 at 18:17 +1100, John Warburton wrote:
> 
>>OK
>>
>>Since no-one has responded (does anyone else live here?), I will report 
>>back as to what I had found...
>>
>>One of our other admins set up a host definition without a 
>>check_command. This is fine, as the documentation says "If you leave 
>>this argument blank, the host will not be checked - Nagios will always 
>>assume the host is up." (see 
>>http://nagios.sourceforge.net/docs/2_0/xodtemplate.html#host)
>>
>>Unfortunately, the code, when displaying host specific stuff (eg the 
>>"Host Detail" button, or 2-D status map), will assume that there is a 
>>value in the data structure for "plugin_output".
>>
>>This explains my seg fault.
> 
> 
> I don't quite understand, you had a check_command defined but it was
> blank? 
> 

He didn't specify one at all.

> I tried this but it throws an error for me when I verify the
> configuration.
> 
> As for actually having an undefined check_command in a host definition,
> I use a few of these in 2.0 and they work as expected. They simply list
> (null) for output in the cgis.
> 

Ancient printf() implementations segfault on printf("%s", NULL), just as 
most current (but not all) strdup() and free() implementations segfault 
when fed a NULL pointer.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click




More information about the Developers mailing list