Re: [Nagios-devel] trying to find problem in cgi/status.c
Posted: Fri Mar 04, 2005 8:07 am
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/ ... .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 [email protected]
OP5 AB www.op5.se
Lead Developer
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
> 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/ ... .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 [email protected]
OP5 AB www.op5.se
Lead Developer
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]