Hi,
Firstly, can I just say what a great bit of software Nagios is. We use it
here to monitor about 300 services on over 50 local, remote and virtual
hosts, and it has replaced a number of clunky and incompatible monitoring
scripts.
I've written a plugin which times the performance of a mysql SQL command.
It gets called something like this:
check_mysql_perf -H hostname -e 'select count(*) from foo;' -d mysql -w 10000 -c 20000
The -e flag specifies the SQL command to time, and the ';' character is
valid SQL.
Now, when the code in xmodtemplate.c reads this command in, it interprets
the ';' as "rest of this line is a comment". (I can work around this by
handling the ';' as needed inside the plugin). This happens in
xodtemplate.c, line 163:
/* skip blank lines and comments */
if(input[0]=='#' || input[0]==';' || input[0]=='\x0' || input[0]=='\n' || input[0]=='\r')
continue;
Could I suggest that the code (and the config file specification) be
ammended to allow escaping of literal comment characters in config values,
for example with \; and \#
(Oh, and another suggestion would be to have CVS $Id:$ tags inside the
source files. This helps when tracking down bugs by helping make sure
everyone is talking about the same version of the code.)
Thanks again for all the hard work,
Jon
--
Jon Wilson
Netcraft Ltd. Tel: +44 (0)1225 867975
[email protected] Fax: +44 (0)8700 517767
http://www.netcraft.com Mob: +44 (0)7776 137939
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]