[Nagiosplug-devel] devolper guidelines
Christoph Maser
cmr at financial.com
Sun May 14 06:48:03 CEST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
there is a point in the developer-guidelines wich i think is a bit problematic.
It says:
"The -? option, or any other unparsable set of options, should print out a short usage
statement. Character width should be 80 and less and no more that 23 lines should be
printed (it should display cleanly on a dumb terminal in a server room)."
The problem i see with this is that if you missconfigure the plugin inside nagios you
might get something like non-ok exitcode with no ouput at all (lead to the famous "No
output returned from plugin". Since the output can be multiline and the 1st line can be empty.
An example where this happens is check_nrp called with wrong flags. It reutrns a decent
error-message on STDERR but usage with an empty 1st line on STDOUT. I've seen this leading
to long sessions of debugging.
I would propose to rephrase that part to sth like the following:
"The -? option should print out a short usage statement on STDOUT. Character width should
be 80 and less and no more that 23 lines should be printed (it should display cleanly on a
dumb terminal in a server room).
Any unparsable or unusable set of options should return exitcode 3 (unknown) and _one
line_ on STDOUT indicating the plugin was called with and unparsable or unusable set of
options, and the usage statement on STDERR."
Chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEZzMpsLjW0HYht7URAtpxAJ9WY/EAvZ9XwZgWQaksrbwLOkTzgACfQJTR
xnE/qk01GM4OJ5TtVNOKMN8=
=nhuE
-----END PGP SIGNATURE-----
More information about the Devel
mailing list