summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Nierlein <sven@nierlein.de>2015-10-04 16:35:26 (GMT)
committerSven Nierlein <sven@nierlein.de>2015-10-04 17:04:46 (GMT)
commit741710c27c1749b81be4260a2ce0c18b319623cd (patch)
tree7d093fa1c8b8a080d62d5183f9f3366b43d7ed6e
parent20d223119eb40bd1ecdd637eb845f5e16c87bd36 (diff)
downloadmonitoring-plugins-741710c.tar.gz
use exit code 3 for version and help
Plugins which use OK state for help or version information may run unnoticed in that modes without doing any check. So its good style to let version and help exit with Unknown state. Signed-off-by: Sven Nierlein <sven@nierlein.de>
-rw-r--r--doc/developer-guidelines.sgml9
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/developer-guidelines.sgml b/doc/developer-guidelines.sgml
index d934028..228d3fa 100644
--- a/doc/developer-guidelines.sgml
+++ b/doc/developer-guidelines.sgml
@@ -194,13 +194,15 @@
194 <row> 194 <row>
195 <entry align="center"><para>3</para></entry> 195 <entry align="center"><para>3</para></entry>
196 <entry valign="middle"><para>Unknown</para></entry> 196 <entry valign="middle"><para>Unknown</para></entry>
197 <entry><para>Invalid command line arguments were supplied to the 197 <entry><para>Invalid command line arguments were supplied to the
198 plugin or low-level failures internal to the plugin (such as unable to fork, 198 plugin or low-level failures internal to the plugin (such as unable to fork,
199 or open a tcp socket) that prevent it from performing the specified 199 or open a tcp socket) that prevent it from performing the specified
200 operation. Higher-level errors (such as name resolution errors, 200 operation. Higher-level errors (such as name resolution errors,
201 socket timeouts, etc) are outside of the control of plugins and should 201 socket timeouts, etc) are outside of the control of plugins and should
202 generally NOT be reported as UNKNOWN states. 202 generally NOT be reported as UNKNOWN states.
203 </para></entry> 203 </para>
204 <para>The --help or --version output should also result in Unknown state.</para>
205 </entry>
204 </row> 206 </row>
205 </tbody> 207 </tbody>
206 </tgroup> 208 </tgroup>
@@ -610,6 +612,9 @@
610 <para>The option -v or --verbose should be present in all plugins. 612 <para>The option -v or --verbose should be present in all plugins.
611 The user should be allowed to specify -v multiple times to increase 613 The user should be allowed to specify -v multiple times to increase
612 the verbosity level, as described in <xref linkend="verboselevels">.</para> 614 the verbosity level, as described in <xref linkend="verboselevels">.</para>
615
616 The exit code for version information or help should be UNKNOWN
617 (3).</para>
613 </section> 618 </section>
614 619
615 <section> 620 <section>