X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=doc%2Fdeveloper-guidelines.sgml;h=1ae419a21b2a714346ed94f1670c54bafabd546d;hb=bd2cc1811bdea7fe77acab43e281dd3915882b24;hp=44fca2437f9a0e1e1280cc70c6131c80fb25dae1;hpb=49d8064bf3986f3c57385e643aa865dd1390271e;p=nagiosplug.git diff --git a/doc/developer-guidelines.sgml b/doc/developer-guidelines.sgml index 44fca24..1ae419a 100644 --- a/doc/developer-guidelines.sgml +++ b/doc/developer-guidelines.sgml @@ -87,11 +87,14 @@ the entire output to appear in a pager message, which will get chopped off after a certain length. + As Nagios does not capture stderr output, you should only output to + STDOUT and not print to STDERR. +
Print only one line of text Nagios will only grab the first line of text from STDOUT when it notifies contacts about potential problems. If you print - multiple lines, you're out of luck. Remember, keep it short and - to the point. + multiple lines, you're out of luck (though this will be a feature of + Nagios 3). Remember, keep your output short and to the point. Output should be in the format: @@ -139,8 +142,9 @@
Screen Output The plug-in should print the diagnostic and just the - synopsis part of the help message. A well written plugin would + usage part of the help message. A well written plugin would then have --help as a way to get the verbose help. + Code and output should try to respect the 80x25 size of a crt (remember when fixing stuff in the server room!)
@@ -731,6 +735,10 @@ setup the tests. Run "make test" to run all the tests. You should use /* */ for comments and not // as some compilers do not handle the latter form. + + You should also avoid using the type "bool" and its values + "true" and "false". Instead use the "int" type and the plugins' own + "TRUE"/"FALSE" values to keep the code uniformly.
Crediting sources