Code

Updated requirements for GNU tools
[nagiosplug.git] / doc / developer-guidelines.sgml
1 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN" >
2 <book>
3   <title>Nagios Plug-in Developer Guidelines</title>
5   <bookinfo>
6     <authorgroup>
7       <author>
8         <firstname>Karl</firstname>
9         <surname>DeBisschop</surname>
10         <affiliation>
11           <address><email>karl@debisschop.net</email></address>
12         </affiliation>
13       </author>
15       <author>
16         <firstname>Ethan</firstname>
17         <surname>Galstad</surname>
18         <authorblurb>
19           <para>Author of Nagios</para>
20           <para><ulink url="http://www.nagios.org"></ulink></para>
21         </authorblurb>
22         <affiliation>
23           <address><email>netsaint@linuxbox.com</email></address>
24         </affiliation>
25       </author>
27       <author>
28         <firstname>Hugo</firstname>
29         <surname>Gayosso</surname>
30         <affiliation>
31           <address><email>hgayosso@gnu.org</email></address>
32         </affiliation>
33       </author>
35           
36         <author>
37         <firstname>Subhendu</firstname>
38         <surname>Ghosh</surname>
39         <affiliation>
40                 <address><email>sghosh@sourceforge.net</email></address>
41         </affiliation>
42         </author>
43         
44         <author>
45         <firstname>Stanley</firstname>
46         <surname>Hopcroft</surname>
47         <affiliation>
48                 <address><email>stanleyhopcroft@sourceforge.net</email></address>
49         </affiliation>
50         </author>       
52       <author>
53         <firstname>Ton</firstname>
54         <surname>Voon</surname>
55         <affiliation>
56           <address><email>tonvoon@users.sourceforge.net</email></address>
57         </affiliation>
58       </author>
60        <author>
61         <firstname>Jeremy T</firstname>
62         <surname>Bouse</surname>
63         <affiliation>
64           <address><email>undrgrid@users.sourceforge.net</email></address>
65         </affiliation>
66       </author>
67     </authorgroup>
69     <pubdate>2002</pubdate>
70     <title>Nagios plug-in development guidelines</title>
71         
72     <revhistory>
73        <revision>
74           <revnumber>$Revision$</revnumber>
75           <date>$Date$</date>
76        </revision>
77     </revhistory>
79         <copyright>
80                 <year>2000 - 2004</year> 
81                 <holder>Nagios Plugins Development Team</holder>
82         </copyright>
84 </bookinfo>
87 <preface id="preface"><title>Preface</title>
88     <para>The purpose of this guidelines is to provide a reference for
89     the plug-in developers and encourage the standarization of the
90     different kind of plug-ins: C, shell, perl, python, etc.</para>
92         <para>Nagios Plug-in Development Guidelines Copyright (C) 2000-2003
93         (Karl DeBisschop, Ethan Galstad, Stanley Hopcroft, Subhendu Ghosh, Ton Voon, Jeremy T. Bouse)</para>
95         <para>Permission is granted to make and distribute verbatim
96         copies of this manual provided the copyright notice and this
97         permission notice are preserved on all copies.</para>
99         <para>The plugins themselves are copyrighted by their respective
100         authors.</para>
101 </preface>
103 <article>
104 <section id="DevRequirements"><title>Development platform requirements</title>
105         <para>
106         Nagios plugins are developed to the GNU standard, so any OS which is supported by GNU
107         should run the plugins. While the requirements for compiling the Nagios plugins release 
108         is very small, to develop from CVS needs additional software to be installed. These are the 
109         minimum levels of software required:
111         <literallayout>
112         gnu make 3.79
113         automake 1.8.3
114         autoconf 2.58
115         gettext 0.11.5
116         </literallayout>
118         To compile from CVS, after you have checked out the code, run:
119         <literallayout>
120         tools/setup
121         ./configure
122         make
123         make install
124         </literallayout>
125         </para>
126 </section>
128 <section id="PlugOutput"><title>Plugin Output for Nagios</title>
129         
130                 <para>You should always print something to STDOUT that tells if the 
131                 service is working or why it is failing. Try to keep the output short - 
132                 probably less that 80 characters. Remember that you ideally would like 
133                 the entire output to appear in a pager message, which will get chopped
134                 off after a certain length.</para>
136                 <section><title>Print only one line of text</title>
137                 <para>Nagios will only grab the first line of text from STDOUT
138                 when it notifies contacts about potential problems. If you print
139                 multiple lines, you're out of luck. Remember, keep it short and
140                 to the point.</para>
142                 <para>Output should be in the format:</para>
143                 <literallayout>
144                 METRIC STATUS: Information text
145                 </literallayout>
146                 <para>However, note that this is not a requirement of the API, so you cannot depend on this
147                 being an accurate reflection of the status of the service - the status should always 
148                 be determined by the return code.</para>
149                 </section>
151                 <section><title>Verbose output</title>
152                 <para>Use the -v flag for verbose output. You should allow multiple
153                 -v options for additional verbosity, up to a maximum of 3. The standard
154                 type of output should be:</para>
156                 <table id="verboselevels"><title>Verbose output levels</title>
157                         <tgroup cols="2">
158                                 <thead>
159                                         <row>
160                                                 <entry><para>Verbosity level</para></entry>
161                                                 <entry><para>Type of output</para></entry>
162                                         </row>
163                                 </thead>
164                                 <tbody>
165                                         <row>
166                                                 <entry align="center"><para>0</para></entry>
167                                                 <entry><para>Single line, minimal output. Summary</para></entry>
168                                         </row>
169                                         <row>
170                                                 <entry align="center"><para>1</para></entry>
171                                                 <entry><para>Single line, additional information (eg list processes that fail)</para></entry>
172                                         </row>
173                                         <row>
174                                                 <entry align="center"><para>2</para></entry>
175                                                 <entry><para>Multi line, configuration debug output (eg ps command used)</para></entry>
176                                         </row>
177                                         <row>
178                                                 <entry align="center"><para>3</para></entry>
179                                                 <entry><para>Lots of detail for plugin problem diagnosis</para></entry>
180                                         </row>
181                                 </tbody>
182                         </tgroup>
183                 </table>
184                 </section>
186                 <section><title>Screen Output</title>
187                 <para>The plug-in should print the diagnostic and just the
188                 synopsis part of the help message.  A well written plugin would
189                 then have --help as a way to get the verbose help.</para>
190                 <para>Code and output should try to respect the 80x25 size of a
191                 crt (remember when fixing stuff in the server room!)</para>
192                 </section>
193                 
194             <section><title>Return the proper status code</title>
195                 <para>See <xref linkend="ReturnCodes"> below
196                 for the numeric values of status codes and their
197                 description. Remember to return an UNKNOWN state if bogus or
198                 invalid command line arguments are supplied or it you are unable
199                 to check the service.</para>
200                 </section>
201                 
202                 <section><title>Plugin Return Codes</title>
203                 <para>The return codes below are based on the POSIX spec of returning
204                 a positive value.  Netsaint prior to v0.0.7 supported non-POSIX
205                 compliant return code of "-1" for unknown.  Nagios supports POSIX return
206                 codes by default.</para>
208                 <para>Note: Some plugins will on occasion print on STDOUT that an error
209                 occurred and error code is 138 or 255 or some such number.  These
210                 are usually caused by plugins using system commands and having not 
211                 enough checks to catch unexpected output.  Developers should include a
212                 default catch-all for system command output that returns an UNKNOWN
213                 return code.</para>
214                 
215                 <table id="ReturnCodes"><title>Plugin Return Codes</title>
216                         <tgroup cols="3">
217                                 <thead>
218                                         <row>
219                                                 <entry><para>Numeric Value</para></entry>
220                                                 <entry><para>Service Status</para></entry>
221                                                 <entry><para>Status Description</para></entry>
222                                         </row>
223                                 </thead>
224                                 <tbody>
225                                         <row>
226                                                 <entry align="center"><para>0</para></entry>
227                                                 <entry valign="middle"><para>OK</para></entry>
228                                                 <entry><para>The plugin was able to check the service and it 
229                                                 appeared to be functioning properly</para></entry>
230                                         </row>
231                                         <row>
232                                                 <entry align="center"><para>1</para></entry>
233                                                 <entry valign="middle"><para>Warning</para></entry>
234                                                 <entry><para>The plugin was able to check the service, but it 
235                                                 appeared to be above some "warning" threshold or did not appear 
236                                                 to be working properly</para></entry>
237                                         </row>
238                                         <row>
239                                                 <entry align="center"><para>2</para></entry>
240                                                 <entry valign="middle"><para>Critical</para></entry>
241                                                 <entry><para>The plugin detected that either the service was not 
242                                                 running or it was above some "critical" threshold</para></entry>
243                                         </row>
244                                         <row>
245                                                 <entry align="center"><para>3</para></entry>
246                                                 <entry valign="middle"><para>Unknown</para></entry>
247                                                 <entry><para>Invalid command line arguments were supplied to the 
248                                                 plugin or the plugin was unable to check the status of the given 
249                                                 hosts/service</para></entry>
250                                         </row>
251                                 </tbody>
252                         </tgroup>
253                 </table>
255       
256                 </section>
258                 <section id="thresholdformat"><title>Threshold range format</title>
259                 <para>Thresholds ranges define the warning and critical levels for plugins to 
260                 alert on. The theory is that the plugin will do some sort of check which returns
261                 back a numerical value, or metric, which is then compared to the warning and 
262                 critical thresholds.
263                 This is the generalised format for threshold ranges:</para>
265                 <literallayout>
266                 [@]start:end
267                 </literallayout>
268         
269                 <para>Notes:</para>
270                 <orderedlist>
271                 <listitem><para>start &gt; end</para>
272                         </listitem>
273                 <listitem><para>start and ":" is not required if start=0</para>
274                         </listitem>
275                 <listitem><para>if range is of format "start:" and end is not specified, 
276                         assume end is infinity</para>
277                         </listitem>
278                 <listitem><para>to specify negative infinity, use "~"</para>
279                         </listitem>
280                 <listitem><para>alert is raised if metric is outside start and end range
281                         (inclusive of endpoints)</para>
282                         </listitem>
283                 <listitem><para>if range starts with "@", then alert if inside this range
284                         (inclusive of endpoints)</para>
285                         </listitem>
286                 </orderedlist>
287                 
288                 <para>Note: Not all plugins are coded to expect ranges in this format. It is
289                 planned for a future release to
290                 provide standard libraries to parse and compare metrics against ranges. There
291                 will also be some work in providing multiple metrics.</para>
292                 </section>
294                 <section><title>Performance data</title>
295                 <para>Performance data is defined by Nagios as "everything after the | of the plugin output" -
296                 please refer to Nagios documentation for information on capturing this data to logfiles.
297                 However, it is the responsibility of the plugin writer to ensure the 
298                 performance data is in a "Nagios plugins" format.
299                 This is the expected format:</para>
301                 <literallayout>
302                 'label'=value[UOM];[warn];[crit];[min];[max]
303                 </literallayout>
305                 <para>Notes:</para>
306                 <orderedlist>
307                 <listitem><para>space separated list of label/value pairs</para>
308                         </listitem>
309                 <listitem><para>label can contain any characters</para>
310                         </listitem>
311                 <listitem><para>the single quotes for the label are optional. Required if 
312                         spaces, = or ' are in the label</para>
313                         </listitem>
314                 <listitem><para>label length is arbitrary, but ideally the first 19 characters
315                         are unique (due to a limitation in RRD). Be aware of a limitation in the
316                         amount of data that NRPE returns to Nagios</para>
317                         </listitem>
318                 <listitem><para>to specify a quote character, use two single quotes</para>
319                         </listitem>
320                 <listitem><para>warn, crit, min or max may be null (for example, if the threshold is 
321                         not defined or min and max do not apply). Trailing unfilled semicolons can be
322                         dropped</para>
323                         </listitem>
324                 <listitem><para>min and max are not required if UOM=%</para>
325                         </listitem>
326                 <listitem><para>value, min and max in class [-0-9.]. Must all be the
327                         same UOM</para>
328                         </listitem>
329                 <listitem><para>warn and crit are in the range format (see 
330                         <xref linkend="thresholdformat">). Must be the same UOM</para>
331                         </listitem>
332                 <listitem><para>UOM (unit of measurement) is one of:</para>
333                         <orderedlist>
334                         <listitem><para>no unit specified - assume a number (int or float) 
335                                 of things (eg, users, processes, load averages)</para>
336                                 </listitem>
337                         <listitem><para>s - seconds (also us, ms)</para></listitem>
338                         <listitem><para>% - percentage</para></listitem>
339                         <listitem><para>B - bytes (also KB, MB, TB)</para></listitem>
340                         <listitem><para>c - a continous counter (such as bytes
341                                 transmitted on an interface)</para></listitem>
342                         </orderedlist>
343                         </listitem>
344                 </orderedlist>
346                 <para>It is up to third party programs to convert the Nagios plugins 
347                 performance data into graphs.</para>
348                 </section>
350         <section><title>Translations</title>
351         <para>If possible, use translation tools for all output. Currently, most of the core C plugins 
352         use gettext for translation. General guidelines are:</para>
354         <orderedlist>
355         <listitem><para>short help is not translated</para></listitem>
356         <listitem><para>long help has options in English language, but text translated</para></listitem>
357         <listitem><para>"Copyright" kept in English</para></listitem>
358         <listitem><para>copyright holder names kept in original text</para></listitem>
359         </orderedlist>
360         </section>
361 </section>
363 <section id="SysCmdAuxFiles"><title>System Commands and Auxiliary Files</title>
365                 <section><title>Don't execute system commands without specifying their
366                 full path</title>
367                 <para>Don't use exec(), popen(), etc. to execute external
368                 commands without explicity using the full path of the external
369                 program.</para>
371                 <para>Doing otherwise makes the plugin vulnerable to hijacking
372                 by a trojan horse earlier in the search path. See the main
373                 plugin distribution for examples on how this is done.</para>
374                 </section>
376                 <section><title>Use spopen() if external commands must be executed</title>
378             <para>If you have to execute external commands from within your
379         plugin and you're writing it in C, use the spopen() function
380                 that Karl DeBisschop has written.</para>
382                 <para>The code for spopen() and spclose() is included with the
383                 core plugin distribution.</para>
384                 </section>
386                 <section><title>Don't make temp files unless absolutely required</title>
388                 <para>If temp files are needed, make sure that the plugin will
389                 fail cleanly if the file can't be written (e.g., too few file
390                 handles, out of disk space, incorrect permissions, etc.) and
391                 delete the temp file when processing is complete.</para>
392                 </section>
394         <section><title>Don't be tricked into following symlinks</title>
396                 <para>If your plugin opens any files, take steps to ensure that
397                 you are not following a symlink to another location on the
398                 system.</para>
399                 </section>
401                 <section><title>Validate all input</title>
403                 <para>use routines in utils.c or utils.pm and write more as needed</para>
404                 </section>
406 </section>
407         
411 <section id="PerlPlugin"><title>Perl Plugins</title>
413                 <para>Perl plugins are coded a little more defensively than other
414                 plugins because of embedded Perl.  When configured as such, embedded
415                 Perl Nagios (ePN) requires stricter use of the some of Perl's features.
416                 This section outlines some of the steps needed to use ePN
417                 effectively.</para>
418           
419                 <orderedlist>
420                         
421                         <listitem><para> Do not use BEGIN and END blocks since they will be called 
422                         only once (when Nagios starts and shuts down) with Embedded Perl (ePN).  In 
423                         particular, do not use BEGIN blocks to initialize variables.</para>
424                         </listitem>
425           
426                         <listitem><para>To use utils.pm, you need to provide a full path to the
427                         module in order for it to work.</para>
428                         
429           <literallayout>
430           e.g.
431                 use lib "/usr/local/nagios/libexec";
432                 use utils qw(...);
433           </literallayout>
434                         </listitem>
436                         <listitem><para>Perl scripts should be called with "-w"</para>
437                         </listitem>
438                         
439                         <listitem><para>All Perl plugins must compile cleanly under "use strict" - i.e. at
440                         least explicitly package names as in "$main::x" or predeclare every
441                         variable. </para>
442                         
444                         <para>Explicitly initialize each variable in use.  Otherwise with
445                         caching enabled, the plugin will not be recompiled each time, and
446                         therefore Perl will not reinitialize all the variables.  All old
447                         variable values will still be in effect.</para>
448                         </listitem>
449                         
450                         <listitem><para>Do not use &gt;DATA&lt; handles (these simply do not compile under ePN).</para>
451                         </listitem>
453                         <listitem><para>Do not use global variables in named subroutines. This is bad practise anyway, but with ePN the
454                         compiler will report an error "&lt;global_var&gt; will not stay shared ..". Values used by
455                         subroutines should be passed in the argument list.</para> 
456                         </listitem>
458                         <listitem><para>If writing to a file (perhaps recording
459                         performance data) explicitly close close it.  The plugin never
460                         calls <emphasis role="strong">exit</emphasis>; that is caught by
461                         p1.pl, so output streams are never closed.</para>
462                         </listitem>
463                 
464                         <listitem><para>As in <xref linkend="runtime"> all plugins need 
465                         to monitor their runtime, specially if they are using network
466                         resources.  Use of the <emphasis>alarm</emphasis> is recommended
467                         noting that some Perl modules (eg LWP) manage timers, so that an alarm
468                         set by a plugin using such a module is overwritten by the module.
469                         (workarounds are cunning (TM) or using the module timer)
470                         Plugins may import a default time out ($TIMEOUT) from utils.pm.
471                         </para>
472                         </listitem>
474                         <listitem><para>Perl plugins should import %ERRORS from utils.pm
475                         and then "exit $ERRORS{'OK'}" rather than "exit 0"
476                         </para>
477                         </listitem>
478                         
479                 </orderedlist>
480           
481 </section>
483 <section id="runtime"><title>Runtime Timeouts</title>
485                 <para>Plugins have a very limited runtime - typically 10 sec.
486                 As a result, it is very important for plugins to maintain internal
487                 code to exit if runtime exceeds a threshold. </para>
489                 <para>All plugins should timeout gracefully, not just networking
490                 plugins. For instance, df may lock if you have automounted
491                 drives and your network fails - but on first glance, who'd think
492                 df could lock up like that.  Plus, it should just be more error
493                 resistant to be able to time out rather than consume
494                 resources.</para>
495                 
496                 <section><title>Use DEFAULT_SOCKET_TIMEOUT</title>
498                 <para>All network plugins should use DEFAULT_SOCKET_TIMEOUT to timeout</para>
500                 </section>
502                 
503                 <section><title>Add alarms to network plugins</title>
505                 <para>If you write a plugin which communicates with another
506                 networked host, you should make sure to set an alarm() in your
507                 code that prevents the plugin from hanging due to abnormal
508                 socket closures, etc. Nagios takes steps to protect itself
509                 against unruly plugins that timeout, but any plugins you create
510                 should be well behaved on their own.</para>
512                 </section>
514                 
516 </section>
518 <section id="PlugOptions"><title>Plugin Options</title>
519         
520                 <para>A well written plugin should have --help as a way to get 
521                 verbose help. Code and output should try to respect the 80x25 size of a
522                 crt (remember when fixing stuff in the server room!)</para>
523                 
524                 <section><title>Option Processing</title>
526                 <para>For plugins written in C, we recommend the C standard
527                 getopt library for short options. Getopt_long is always available.
528                 </para>
530                 <para>For plugins written in Perl, we recommend Getopt::Long module.</para>
532                 <para>Positional arguments are strongly discouraged.</para>
534                 <para>There are a few reserved options that should not be used
535                 for other purposes:</para>
537                 <literallayout>
538           -V version (--version)
539           -h help (--help)
540           -t timeout (--timeout)
541           -w warning threshold (--warning)
542           -c critical threshold (--critical)
543           -H hostname (--hostname)
544           -v verbose (--verbose)
545                 </literallayout>
547                 <para>In addition to the reserved options above, some other standard options are:</para>
549                 <literallayout>
550           -C SNMP community (--community)
551           -a authentication password (--authentication)
552           -l login name (--logname)
553           -p port or password (--port or --passwd/--password)monitors operational
554           -u url or username (--url or --username)
555                 </literallayout>
556           
557                 <para>Look at check_pgsql and check_procs to see how I currently
558                 think this can work.  Standard options are:</para>
560           
561                 <para>The option -V or --version should be present in all
562                 plugins. For C plugins it should result in a call to print_revision, a
563                 function in utils.c which takes two character arguments, the
564                 command name and the plugin revision.</para>
566                 <para>The -? option, or any other unparsable set of options,
567                 should print out a short usage statement. Character width should
568                 be 80 and less and no more that 23 lines should be printed (it
569                 should display cleanly on a dumb terminal in a server
570                 room).</para>
572                 <para>The option -h or --help should be present in all plugins.
573                 In C plugins, it should result in a call to print_help (or
574                 equivalent).  The function print_help should call print_revision, 
575                 then print_usage, then should provide detailed
576                 help. Help text should fit on an 80-character width display, but
577                 may run as many lines as needed.</para>
579                 <para>The option -v or --verbose should be present in all plugins.
580                 The user should be allowed to specify -v multiple times to increase
581                 the verbosity level, as described in <xref linkend="verboselevels">.</para>
582     </section>
584     <section>
585       <title>Plugins with more than one type of threshold, or with
586       threshold ranges</title>
588       <para>Old style was to do things like -ct for critical time and
589       -cv for critical value. That goes out the window with POSIX
590       getopt. The allowable alternatives are:</para>
592       <orderedlist>
593         <listitem>
594           <para>long options like -critical-time (or -ct and -cv, I
595           suppose).</para>
596         </listitem>
598         <listitem>
599           <para>repeated options like `check_load -w 10 -w 6 -w 4 -c
600           16 -c 10 -c 10`</para>
601         </listitem>
603         <listitem>
604           <para>for brevity, the above can be expressed as `check_load
605           -w 10,6,4 -c 16,10,10`</para>
606         </listitem>
608         <listitem>
609           <para>ranges are expressed with colons as in `check_procs -C
610           httpd -w 1:20 -c 1:30` which will warn above 20 instances,
611           and critical at 0 and above 30</para>
612         </listitem>
614         <listitem>
615           <para>lists are expressed with commas, so Jacob's check_nmap
616           uses constructs like '-p 1000,1010,1050:1060,2000'</para>
617         </listitem>
619         <listitem>
620           <para>If possible when writing lists, use tokens to make the
621           list easy to remember and non-order dependent - so
622           check_disk uses '-c 10000,10%' so that it is clear which is
623           the precentage and which is the KB values (note that due to
624           my own lack of foresight, that used to be '-c 10000:10%' but
625           such constructs should all be changed for consistency,
626           though providing reverse compatibility is fairly
627           easy).</para>
628         </listitem>
630       </orderedlist>
632       <para>As always, comments are welcome - making this consistent
633       without a host of long options was quite a hassle, and I would
634       suspect that there are flaws in this strategy. 
635       </para>
636     </section>
637 </section>
639 <section id="CodingGuidelines"><title>Coding guidelines</title>
640         <para>See <ulink url="http://www.gnu.org/prep/standards_toc.html">GNU
641         Coding standards</ulink> for general guidelines.</para>
642         <section><title>Comments</title>
643         <para>You should use /* */ for comments and not // as some compilers
644         do not handle the latter form.</para>
645         <para>There should not be any named credits in the source code - contributors
646         should be added 
647         into the AUTHORS file instead. The only exception to this is if a routine
648         has been copied from another source.</para>
649         </section>
651         <section><title>CVS comments</title>
652         <para>When adding CVS comments at commit time, you can use the following prefixes:
653         <variablelist>
654           <varlistentry><term>- comment</term>
655           <listitem>
656             <para>for a comment that can be removed from the Changelog</para>
657           </listitem>
658           </varlistentry>
659           <varlistentry><term>* comment</term>
660           <listitem>
661             <para>for an important amendment to be included into a features list</para>
662           </listitem>
663           </varlistentry>
664         </variablelist>
665         </para>
666         <para>If the change is due to a contribution, please quote the contributor's name 
667         and, if applicable, add the SourceForge Tracker number. Don't forget to 
668 update the AUTHORS file.</para>
669         </section>
670 </section>
672 <section id="SubmittingChanges"><title>Submission of new plugins and patches</title>
674         <section id="Patches"><title>Patches</title>
675         <para>If you have a bug patch, please supply a unified or context diff against the
676         version you are using. For new features, please supply a diff against
677         the CVS HEAD version.</para>
679         <para>Patches should be submitted via 
680         <ulink url="http://sourceforge.net/tracker/?group_id=29880&amp;atid=397599">SourceForge's
681         tracker system for Nagiosplug patches</ulink> 
682         and be announced to the nagiosplug-devel mailing list.</para>
684         <para>Submission of a patch implies that the submmitter acknowledges that they
685         are the author of the code (or have permission from the author to release the code)
686         and agree that the code can be released under the GPL. The copyright for the changes will 
687         then revert to the Nagios Plugin Development Team - this is required so that any copyright 
688         infringements can be investigated quickly without contacting a huge list of copyright holders.
689         Credit will always be given for any patches through a THANKS file in the distribution.</para>
690         </section>
692         <section id="Newplugins"><title>New plugins</title>
693         <para>If you would like others to use your plugins and have it included in
694         the standard distribution, please include patches for the relevant
695         configuration files, in particular "configure.in". Otherwise submitted 
696         plugins will be included in the contrib directory.</para>
697         
698         <para>Plugins in the contrib directory are going to be migrated to the
699         standard plugins/plugin-scripts directory as time permits and per user
700         requests. The minimum requirements are:</para>
702       <orderedlist>
703         <listitem>
704           <para>The standard command options are supported (--help, --version,
705           --timeout, --warning, --critical)</para>
706         </listitem>
707         <listitem>
708           <para>It is determined to be not redundant (for instance, we would not 
709                 add a new version of check_disk just because someone had provide 
710                 a plugin that had perf checking - we would incorporate the features 
711                 into an exisiting plugin)</para>
712         </listitem>
713         <listitem>
714           <para>One of the developers has had the time to audit the code and declare
715                 it ready for core</para>
716         </listitem>
717         <listitem>
718           <para>It should also follow code format guidelines, and use functions from
719 utils (perl or c or sh) rather than cooking it's own</para>
720         </listitem>
721       </orderedlist>
723         <para>New plugins should be submitted via 
724         <ulink url="http://sourceforge.net/tracker/?group_id=29880&amp;atid=541465">SourceForge's
725         tracker system for Nagiosplug new plugins</ulink> 
726         and be announced to the nagiosplug-devel mailing list.</para>
727         
728         <para>For new plugins, provide a diff to add to the EXTRAS list (configure.in) 
729         unless you are fairly sure that the plugin will work for all platforms with 
730         no non-standard software added.</para>
732         <para>If possible please submit a test harness. Documentation on sample
733         tests coming soon.</para>
734         </section>
736 </section>
738 <section id="UsingSourceforge"><title>Using Sourceforge</title>
739 <table id="Projectmemberaccess"><title>Project Member Access</title>
740         <tgroup cols="9">
741                 <thead>
742                         <row>
743                                 <entry><para>Member type</para></entry>
744                                 <entry><para>CVS Access</para></entry>
745                                 <entry><para>Shell Access</para></entry>
746                                 <entry><para>Release Tech</para></entry>
747                                 <entry><para>Tracker Manager</para></entry>
748                                 <entry><para>Task Manager</para></entry>
749                                 <entry><para>Forums</para></entry>
750                                 <entry><para>Doc Manager</para></entry>
751                                 <entry><para>News</para></entry>
752                                 <entry><para>Screenshots</para></entry>
753                                 <entry><para>Notes</para></entry>
754                         </row>
755                 </thead>
756                 <tbody>
757                         <row>
758                                 <entry><para>Translator</para></entry>
759                                 <entry><para>Yes</para></entry>
760                                 <entry><para>Yes</para></entry>
761                                 <entry><para>No</para></entry>
762                                 <entry><para>-</para></entry>
763                                 <entry><para>-</para></entry>
764                                 <entry><para>-</para></entry>
765                                 <entry><para>-</para></entry>
766                                 <entry><para>-</para></entry>
767                                 <entry><para>-</para></entry>
768                                 <entry><para>Add developer to CVSROOT/avail for translation files</para></entry>
769                         </row>
770                         <row>
771                                 <entry><para>Developer</para></entry>
772                                 <entry><para>Yes</para></entry>
773                                 <entry><para>Yes</para></entry>
774                                 <entry><para>No</para></entry>
775                                 <entry><para>-</para></entry>
776                                 <entry><para>A&amp;T</para></entry>
777                                 <entry><para>Moderator</para></entry>
778                                 <entry><para>Editor</para></entry>
779                                 <entry><para>-</para></entry>
780                                 <entry><para>-</para></entry>
781                                 <entry><para>Need to set tracker access individually. Add developer to CVSROOT/avail for all files</para></entry>
782                         </row>
783                 </tbody>
784         </tgroup>
785 </table>
786 <para>Add all members to the nagiosplug-team mailing list</para>
787 </section>
788 </article>
789   
790 </book>