Code

trivial changes to Perl plugin section.
[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.6
114         autoconf 2.54
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="verbose_levels"><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>
349 </section>
351 <section id="SysCmdAuxFiles"><title>System Commands and Auxiliary Files</title>
353                 <section><title>Don't execute system commands without specifying their
354                 full path</title>
355                 <para>Don't use exec(), popen(), etc. to execute external
356                 commands without explicity using the full path of the external
357                 program.</para>
359                 <para>Doing otherwise makes the plugin vulnerable to hijacking
360                 by a trojan horse earlier in the search path. See the main
361                 plugin distribution for examples on how this is done.</para>
362                 </section>
364                 <section><title>Use spopen() if external commands must be executed</title>
366             <para>If you have to execute external commands from within your
367         plugin and you're writing it in C, use the spopen() function
368                 that Karl DeBisschop has written.</para>
370                 <para>The code for spopen() and spclose() is included with the
371                 core plugin distribution.</para>
372                 </section>
374                 <section><title>Don't make temp files unless absolutely required</title>
376                 <para>If temp files are needed, make sure that the plugin will
377                 fail cleanly if the file can't be written (e.g., too few file
378                 handles, out of disk space, incorrect permissions, etc.) and
379                 delete the temp file when processing is complete.</para>
380                 </section>
382         <section><title>Don't be tricked into following symlinks</title>
384                 <para>If your plugin opens any files, take steps to ensure that
385                 you are not following a symlink to another location on the
386                 system.</para>
387                 </section>
389                 <section><title>Validate all input</title>
391                 <para>use routines in utils.c or utils.pm and write more as needed</para>
392                 </section>
394 </section>
395         
399 <section id="PerlPlugin"><title>Perl Plugins</title>
401                 <para>Perl plugins are coded a little more defensively than other
402                 plugins because of embedded Perl.  When configured as such, embedded
403                 Perl Nagios (ePN) requires stricter use of the some of Perl's features.
404                 This section outlines some of the steps needed to use ePN
405                 effectively.</para>
406           
407                 <orderedlist>
408                         
409                         <listitem><para> Do not use BEGIN and END blocks since they will be called 
410                         only once (when Nagios starts and shuts down) with Embedded Perl (ePN).  In 
411                         particular, do not use BEGIN blocks to initialize variables.</para>
412                         </listitem>
413           
414                         <listitem><para>To use utils.pm, you need to provide a full path to the
415                         module in order for it to work.</para>
416                         
417           <literallayout>
418           e.g.
419                 use lib "/usr/local/nagios/libexec";
420                 use utils qw(...);
421           </literallayout>
422                         </listitem>
424                         <listitem><para>Perl scripts should be called with "-w"</para>
425                         </listitem>
426                         
427                         <listitem><para>All Perl plugins must compile cleanly under "use strict" - i.e. at
428                         least explicitly package names as in "$main::x" or predeclare every
429                         variable. </para>
430                         
432                         <para>Explicitly initialize each variable in use.  Otherwise with
433                         caching enabled, the plugin will not be recompiled each time, and
434                         therefore Perl will not reinitialize all the variables.  All old
435                         variable values will still be in effect.</para>
436                         </listitem>
437                         
438                         <listitem><para>Do not use &gt;DATA&lt; handles (these simply do not compile under ePN).</para>
439                         </listitem>
441                         <listitem><para>Do not use global variables in named subroutines. This is bad practise anyway, but with ePN the
442                         compiler will report an error "&lt;global_var&gt; will not stay shared ..". Values used by
443                         subroutines should be passed in the argument list.</para> 
444                         </listitem>
446                         <listitem><para>If writing to a file (perhaps recording
447                         performance data) explicitly close close it.  The plugin never
448                         calls <emphasis role="strong">exit</emphasis>; that is caught by
449                         p1.pl, so output streams are never closed.</para>
450                         </listitem>
451                 
452                         <listitem><para>As in <xref linkend="runtime"> all plugins need 
453                         to monitor their runtime, specially if they are using network
454                         resources.  Use of the <emphasis>alarm</emphasis> is recommended
455                         noting that some Perl modules (eg LWP) manage timers, so that an alarm
456                         set by a plugin using such a module is overwritten by the module.
457                         (workarounds are cunning (TM) or using the module timer)
458                         Plugins may import a default time out ($TIMEOUT) from utils.pm.
459                         </para>
460                         </listitem>
462                         <listitem><para>Perl plugins should import %ERRORS from utils.pm
463                         and then "exit $ERRORS{'OK'}" rather than "exit 0"
464                         </para>
465                         </listitem>
466                         
467                 </orderedlist>
468           
469 </section>
471 <section id="runtime"><title>Runtime Timeouts</title>
473                 <para>Plugins have a very limited runtime - typically 10 sec.
474                 As a result, it is very important for plugins to maintain internal
475                 code to exit if runtime exceeds a threshold. </para>
477                 <para>All plugins should timeout gracefully, not just networking
478                 plugins. For instance, df may lock if you have automounted
479                 drives and your network fails - but on first glance, who'd think
480                 df could lock up like that.  Plus, it should just be more error
481                 resistant to be able to time out rather than consume
482                 resources.</para>
483                 
484                 <section><title>Use DEFAULT_SOCKET_TIMEOUT</title>
486                 <para>All network plugins should use DEFAULT_SOCKET_TIMEOUT to timeout</para>
488                 </section>
490                 
491                 <section><title>Add alarms to network plugins</title>
493                 <para>If you write a plugin which communicates with another
494                 networked host, you should make sure to set an alarm() in your
495                 code that prevents the plugin from hanging due to abnormal
496                 socket closures, etc. Nagios takes steps to protect itself
497                 against unruly plugins that timeout, but any plugins you create
498                 should be well behaved on their own.</para>
500                 </section>
502                 
504 </section>
506 <section id="PlugOptions"><title>Plugin Options</title>
507         
508                 <para>A well written plugin should have --help as a way to get 
509                 verbose help. Code and output should try to respect the 80x25 size of a
510                 crt (remember when fixing stuff in the server room!)</para>
511                 
512                 <section><title>Option Processing</title>
514                 <para>For plugins written in C, we recommend the C standard
515                 getopt library for short options. Getopt_long is always available.
516                 </para>
518                 <para>For plugins written in Perl, we recommend Getopt::Long module.</para>
520                 <para>Positional arguments are strongly discouraged.</para>
522                 <para>There are a few reserved options that should not be used
523                 for other purposes:</para>
525                 <literallayout>
526           -V version (--version)
527           -h help (--help)
528           -t timeout (--timeout)
529           -w warning threshold (--warning)
530           -c critical threshold (--critical)
531           -H hostname (--hostname)
532           -v verbose (--verbose)
533                 </literallayout>
535                 <para>In addition to the reserved options above, some other standard options are:</para>
537                 <literallayout>
538           -C SNMP community (--community)
539           -a authentication password (--authentication)
540           -l login name (--logname)
541           -p port or password (--port or --passwd/--password)monitors operational
542           -u url or username (--url or --username)
543                 </literallayout>
544           
545                 <para>Look at check_pgsql and check_procs to see how I currently
546                 think this can work.  Standard options are:</para>
548           
549                 <para>The option -V or --version should be present in all
550                 plugins. For C plugins it should result in a call to print_revision, a
551                 function in utils.c which takes two character arguments, the
552                 command name and the plugin revision.</para>
554                 <para>The -? option, or any other unparsable set of options,
555                 should print out a short usage statement. Character width should
556                 be 80 and less and no more that 23 lines should be printed (it
557                 should display cleanly on a dumb terminal in a server
558                 room).</para>
560                 <para>The option -h or --help should be present in all plugins.
561                 In C plugins, it should result in a call to print_help (or
562                 equivalent).  The function print_help should call print_revision, 
563                 then print_usage, then should provide detailed
564                 help. Help text should fit on an 80-character width display, but
565                 may run as many lines as needed.</para>
567                 <para>The option -v or --verbose should be present in all plugins.
568                 The user should be allowed to specify -v multiple times to increase
569                 the verbosity level, as described in <xref linkend="verbose_levels">.</para>
570     </section>
572     <section>
573       <title>Plugins with more than one type of threshold, or with
574       threshold ranges</title>
576       <para>Old style was to do things like -ct for critical time and
577       -cv for critical value. That goes out the window with POSIX
578       getopt. The allowable alternatives are:</para>
580       <orderedlist>
581         <listitem>
582           <para>long options like -critical-time (or -ct and -cv, I
583           suppose).</para>
584         </listitem>
586         <listitem>
587           <para>repeated options like `check_load -w 10 -w 6 -w 4 -c
588           16 -c 10 -c 10`</para>
589         </listitem>
591         <listitem>
592           <para>for brevity, the above can be expressed as `check_load
593           -w 10,6,4 -c 16,10,10`</para>
594         </listitem>
596         <listitem>
597           <para>ranges are expressed with colons as in `check_procs -C
598           httpd -w 1:20 -c 1:30` which will warn above 20 instances,
599           and critical at 0 and above 30</para>
600         </listitem>
602         <listitem>
603           <para>lists are expressed with commas, so Jacob's check_nmap
604           uses constructs like '-p 1000,1010,1050:1060,2000'</para>
605         </listitem>
607         <listitem>
608           <para>If possible when writing lists, use tokens to make the
609           list easy to remember and non-order dependent - so
610           check_disk uses '-c 10000,10%' so that it is clear which is
611           the precentage and which is the KB values (note that due to
612           my own lack of foresight, that used to be '-c 10000:10%' but
613           such constructs should all be changed for consistency,
614           though providing reverse compatibility is fairly
615           easy).</para>
616         </listitem>
618       </orderedlist>
620       <para>As always, comments are welcome - making this consistent
621       without a host of long options was quite a hassle, and I would
622       suspect that there are flaws in this strategy. 
623       </para>
624     </section>
625 </section>
627 <section id="CodingGuidelines"><title>Coding guidelines</title>
628         <para>See <ulink url="http://www.gnu.org/prep/standards_toc.html">GNU
629         Coding standards</ulink> for general guidelines.</para>
630         <section><title>Comments</title>
631         <para>You should use /* */ for comments and not // as some compilers
632         do not handle the latter form.</para>
633         <para>There should not be any named credits in the source code - contributors
634         should be added 
635         into the AUTHORS file instead. The only exception to this is if a routine
636         has been copied from another source.</para>
637         </section>
639         <section><title>CVS comments</title>
640         <para>When adding CVS comments at commit time, you can use the following prefixes:
641         <variablelist>
642           <varlistentry><term>- comment</term>
643           <listitem>
644             <para>for a comment that can be removed from the Changelog</para>
645           </listitem>
646           </varlistentry>
647           <varlistentry><term>* comment</term>
648           <listitem>
649             <para>for an important amendment to be included into a features list</para>
650           </listitem>
651           </varlistentry>
652         </variablelist>
653         </para>
654         <para>If the change is due to a contribution, please quote the contributor's name 
655         and, if applicable, add the SourceForge Tracker number. Don't forget to 
656 update the AUTHORS file.</para>
657         </section>
658 </section>
660 <section id="SubmittingChanges"><title>Submission of new plugins and patches</title>
662         <section id="Patches"><title>Patches</title>
663         <para>If you have a bug patch, please supply a unified or context diff against the
664         version you are using. For new features, please supply a diff against
665         the CVS HEAD version.</para>
667         <para>Patches should be submitted via 
668         <ulink url="http://sourceforge.net/tracker/?group_id=29880&amp;atid=397599">SourceForge's
669         tracker system for Nagiosplug patches</ulink> 
670         and be announced to the nagiosplug-devel mailing list.</para>
672         <para>Submission of a patch implies that the submmitter acknowledges that they
673         are the author of the code (or have permission from the author to release the code)
674         and agree that the code can be released under the GPL. The copyright for the changes will 
675         then revert to the Nagios Plugin Development Team - this is required so that any copyright 
676         infringements can be investigated quickly without contacting a huge list of copyright holders.
677         Credit will always be given for any patches through a THANKS file in the distribution.</para>
678         </section>
680         <section id="New_plugins"><title>New plugins</title>
681         <para>If you would like others to use your plugins and have it included in
682         the standard distribution, please include patches for the relevant
683         configuration files, in particular "configure.in". Otherwise submitted 
684         plugins will be included in the contrib directory.</para>
685         
686         <para>Plugins in the contrib directory are going to be migrated to the
687         standard plugins/plugin-scripts directory as time permits and per user
688         requests. The minimum requirements are:</para>
690       <orderedlist>
691         <listitem>
692           <para>The standard command options are supported (--help, --version,
693           --timeout, --warning, --critical)</para>
694         </listitem>
695         <listitem>
696           <para>It is determined to be not redundant (for instance, we would not 
697                 add a new version of check_disk just because someone had provide 
698                 a plugin that had perf checking - we would incorporate the features 
699                 into an exisiting plugin)</para>
700         </listitem>
701         <listitem>
702           <para>One of the developers has had the time to audit the code and declare
703                 it ready for core</para>
704         </listitem>
705         <listitem>
706           <para>It should also follow code format guidelines, and use functions from
707 utils (perl or c or sh) rather than cooking it's own</para>
708         </listitem>
709       </orderedlist>
711         <para>New plugins should be submitted via 
712         <ulink url="http://sourceforge.net/tracker/?group_id=29880&amp;atid=541465">SourceForge's
713         tracker system for Nagiosplug new plugins</ulink> 
714         and be announced to the nagiosplug-devel mailing list.</para>
715         
716         <para>For new plugins, provide a diff to add to the EXTRAS list (configure.in) 
717         unless you are fairly sure that the plugin will work for all platforms with 
718         no non-standard software added.</para>
720         <para>If possible please submit a test harness. Documentation on sample
721         tests coming soon.</para>
722         </section>
724 </section>
726 <section id="Using_Sourceforge"><title>Using Sourceforge</title>
727 <table id="Project_member_access"><title>Project Member Access</title>
728         <tgroup cols="9">
729                 <thead>
730                         <row>
731                                 <entry><para>Member type</para></entry>
732                                 <entry><para>CVS Access</para></entry>
733                                 <entry><para>Shell Access</para></entry>
734                                 <entry><para>Release Tech</para></entry>
735                                 <entry><para>Tracker Manager</para></entry>
736                                 <entry><para>Task Manager</para></entry>
737                                 <entry><para>Forums</para></entry>
738                                 <entry><para>Doc Manager</para></entry>
739                                 <entry><para>News</para></entry>
740                                 <entry><para>Screenshots</para></entry>
741                         </row>
742                 </thead>
743                 <tbody>
744                         <row>
745                                 <entry><para>Developer</para></entry>
746                                 <entry><para>Yes</para></entry>
747                                 <entry><para>Yes</para></entry>
748                                 <entry><para>No</para></entry>
749                                 <entry><para>-</para></entry>
750                                 <entry><para>A&amp;T</para></entry>
751                                 <entry><para>Moderator</para></entry>
752                                 <entry><para>Editor</para></entry>
753                                 <entry><para>-</para></entry>
754                                 <entry><para>-</para></entry>
755                         </row>
756                 </tbody>
757         </tgroup>
758 </table>
759 </section>
760 </article>
761   
762 </book>