On 02/02/2011 04:52 PM, Libor Jelinek wrote:
> Hello dear developers,
> I would like to report you possible bug.
>
> BUG:
> If comment charater ";" is used somewhere in the macro value
> definition line is not parsed like comment but is taken like a part of
> macro value.
>
> HOW TO REPRODUCE: (my case):
> In resource.cfg I have this:
>
> $USER5$=10.0.0.39 ; ISP SMTP server -primary IP
>
> In commands.cfg I have this:
> define command {
> command_name send-smtp
> command_line sendEmail -s $USER5$
> }
>
> But what will be actually executed ("Processed notification command"
> information from nagios.debug file):
>
> sendEmail -s 10.0.0.39 ; ISP's SMTP IP -primary IP
>
> Script sendEmail will quit on this invalid input but it's nowhere
> logged that it crashed (but script do produce error message if
> executed separately).
>
> I think that is a bug because nowhere is said that in macro value
> comments are not allowed.
>
There are a lot of things that aren't allowed, and most of them
aren't mentioned. The documentation states what you need to do to
get things working rather than what you should avoid. Nowhere is
it mentioned that winged comments don't work in resource.cfg,
cgi.cfg and nagios.cfg (to the best of my knowledge, that is). If
you find somewhere that it is, please send a patch to alter it or
remove it so noone else gets bitten by the same problem you ran
into.
--
Andreas Ericsson [email protected]
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.
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]