From 49bf8b3e61264d9783b07bc1299492c448e3a0eb Mon Sep 17 00:00:00 2001
From: Lorenz <12514511+RincewindsHat@users.noreply.github.com>
Date: Sun, 23 Jan 2022 14:41:16 +0100
Subject: Point to Icinga Exchange instead of dead Monitoring Exchange (#1737)
---
doc/developer-guidelines.sgml | 146 +++++++++++++++++++++---------------------
1 file changed, 73 insertions(+), 73 deletions(-)
(limited to 'doc/developer-guidelines.sgml')
diff --git a/doc/developer-guidelines.sgml b/doc/developer-guidelines.sgml
index 6f31f365..28674e05 100644
--- a/doc/developer-guidelines.sgml
+++ b/doc/developer-guidelines.sgml
@@ -13,7 +13,7 @@
2013
Monitoring Plugins Development Guidelines
-
+
1796
@@ -72,14 +72,14 @@
Plugin Output for Nagios
-
- You should always print something to STDOUT that tells if the
- service is working or why it is failing. Try to keep the output short -
- probably less that 80 characters. Remember that you ideally would like
+
+ You should always print something to STDOUT that tells if the
+ service is working or why it is failing. Try to keep the output short -
+ probably less that 80 characters. Remember that you ideally would like
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
+ As Nagios does not capture stderr output, you should only output to
STDOUT and not print to STDERR.
Print only one line of text
@@ -101,7 +101,7 @@
SERVICE STATUS: Information text
However, note that this is not a requirement of the API, so you cannot depend on this
- being an accurate reflection of the status of the service - the status should always
+ being an accurate reflection of the status of the service - the status should always
be determined by the return code.
@@ -148,7 +148,7 @@
Code and output should try to respect the 80x25 size of a
crt (remember when fixing stuff in the server room!)
-
+
Plugin Return Codes
The return codes below are based on the POSIX spec of returning
a positive value. Netsaint prior to v0.0.7 supported non-POSIX
@@ -157,11 +157,11 @@
Note: Some plugins will on occasion print on STDOUT that an error
occurred and error code is 138 or 255 or some such number. These
- are usually caused by plugins using system commands and having not
+ are usually caused by plugins using system commands and having not
enough checks to catch unexpected output. Developers should include a
default catch-all for system command output that returns an UNKNOWN
return code.
-
+
Plugin Return Codes
@@ -175,20 +175,20 @@
0
OK
- The plugin was able to check the service and it
+ The plugin was able to check the service and it
appeared to be functioning properly
1
Warning
- The plugin was able to check the service, but it
- appeared to be above some "warning" threshold or did not appear
+ The plugin was able to check the service, but it
+ appeared to be above some "warning" threshold or did not appear
to be working properly
2
Critical
- The plugin detected that either the service was not
+ The plugin detected that either the service was not
running or it was above some "critical" threshold
@@ -207,7 +207,7 @@
-
+
Translations
- If possible, use translation tools for all output to respect the user's language
- settings. See for guidelines
- for the core plugins.
+ If possible, use translation tools for all output to respect the user's language
+ settings. See for guidelines
+ for the core plugins.
@@ -436,7 +436,7 @@
-
+
@@ -447,17 +447,17 @@
Perl Nagios (ePN) requires stricter use of the some of Perl's features.
This section outlines some of the steps needed to use ePN
effectively.
-
+
-
- Do not use BEGIN and END blocks since they will be called
- only once (when Nagios starts and shuts down) with Embedded Perl (ePN). In
+
+ Do not use BEGIN and END blocks since they will be called
+ only once (when Nagios starts and shuts down) with Embedded Perl (ePN). In
particular, do not use BEGIN blocks to initialize variables.
-
+
To use utils.pm, you need to provide a full path to the
module in order for it to work.
-
+
e.g.
use lib "/usr/local/nagios/libexec";
@@ -467,24 +467,24 @@
Perl scripts should be called with "-w"
-
+
All Perl plugins must compile cleanly under "use strict" - i.e. at
least explicitly package names as in "$main::x" or predeclare every
variable.
-
+
Explicitly initialize each variable in use. Otherwise with
caching enabled, the plugin will not be recompiled each time, and
therefore Perl will not reinitialize all the variables. All old
variable values will still be in effect.
-
+
Do not use >DATA< handles (these simply do not compile under ePN).
Do not use global variables in named subroutines. This is bad practise anyway, but with ePN the
compiler will report an error "<global_var> will not stay shared ..". Values used by
- subroutines should be passed in the argument list.
+ subroutines should be passed in the argument list.
If writing to a file (perhaps recording
@@ -492,8 +492,8 @@
calls exit; that is caught by
p1.pl, so output streams are never closed.
-
- As in all plugins need
+
+ As in all plugins need
to monitor their runtime, specially if they are using network
resources. Use of the alarm is recommended
noting that some Perl modules (eg LWP) manage timers, so that an alarm
@@ -507,9 +507,9 @@
and then "exit $ERRORS{'OK'}" rather than "exit 0"
-
+
-
+
Runtime Timeouts
@@ -524,14 +524,14 @@
df could lock up like that. Plus, it should just be more error
resistant to be able to time out rather than consume
resources.
-
+
Use DEFAULT_SOCKET_TIMEOUT
All network plugins should use DEFAULT_SOCKET_TIMEOUT to timeout
-
+
Add alarms to network plugins
If you write a plugin which communicates with another
@@ -543,16 +543,16 @@
-
+
Plugin Options
-
- A well written plugin should have --help as a way to get
+
+ A well written plugin should have --help as a way to get
verbose help. Code and output should try to respect the 80x25 size of a
crt (remember when fixing stuff in the server room!)
-
+
Option Processing
For plugins written in C, we recommend the C standard
@@ -585,11 +585,11 @@
-p port or password (--port or --passwd/--password)monitors operational
-u url or username (--url or --username)
-
+
Look at check_pgsql and check_procs to see how I currently
think this can work. Standard options are:
-
+
The option -V or --version should be present in all
plugins. For C plugins it should result in a call to print_revision, a
function in utils.c which takes two character arguments, the
@@ -603,7 +603,7 @@
The option -h or --help should be present in all plugins.
In C plugins, it should result in a call to print_help (or
- equivalent). The function print_help should call print_revision,
+ equivalent). The function print_help should call print_revision,
then print_usage, then should provide detailed
help. Help text should fit on an 80-character width display, but
may run as many lines as needed.
@@ -666,7 +666,7 @@
As always, comments are welcome - making this consistent
without a host of long options was quite a hassle, and I would
- suspect that there are flaws in this strategy.
+ suspect that there are flaws in this strategy.
@@ -678,7 +678,7 @@ create and update test cases where possible.
-To run a test, from the top level directory, run "make test". This will run
+To run a test, from the top level directory, run "make test". This will run
all the current tests and report an overall success rate.
@@ -697,7 +697,7 @@ This runs the test in a summary format.
-For a good and amusing tutorial on using Test::More, see this
+For a good and amusing tutorial on using Test::More, see this
link
@@ -706,16 +706,16 @@ link
Testing the C library functions
-We use the libtap library, which gives
+We use the libtap library, which gives
perl's TAP
(Test Anything Protocol) output. This is used by the FreeBSD team for their regression testing.
-To run tests using the libtap library, download the latest tar ball and extract.
-There is a problem with tap-1.01 where
+To run tests using the libtap library, download the latest tar ball and extract.
+There is a problem with tap-1.01 where
pthread support doesn't appear to work
-properly on non-FreeBSD systems. Install with 'CPPFLAGS="-UHAVE_LIBPTHREAD" ./configure && make && make check && make install'.
+properly on non-FreeBSD systems. Install with 'CPPFLAGS="-UHAVE_LIBPTHREAD" ./configure && make && make check && make install'.
@@ -729,8 +729,8 @@ setup the tests. Run "make test" to run all the tests.
See GNU
Coding standards for general guidelines.
C coding
-
- Variables should be declared at the beginning of code blocks and
+
+ Variables should be declared at the beginning of code blocks and
not inline because of portability with older compilers.
You should use /* */ for comments and not // as some compilers
@@ -745,8 +745,8 @@ setup the tests. Run "make test" to run all the tests.
If you have copied a routine from another source, make sure the licence
from your source allows this. Add a comment referencing the ACKNOWLEDGEMENTS
file, where you can put more detail about the source.
- For contributed code, do not add any named credits in the source code
- - contributors should be added into the THANKS.in file instead.
+ For contributed code, do not add any named credits in the source code
+ - contributors should be added into the THANKS.in file instead.
@@ -809,11 +809,11 @@ setup the tests. Run "make test" to run all the tests.
Contributed plugins
- Plugins that have been contributed to the project and
+ Plugins that have been contributed to the project and
distributed with the Monitoring Plugins files are held in the contrib/ directory and are not installed
- by default. These plugins are not officially supported by the team.
- The current policy is that these plugins should be owned and maintained by the original
- contributor, preferably hosted on Monitoring Exchange.
+ by default. These plugins are not officially supported by the team.
+ The current policy is that these plugins should be owned and maintained by the original
+ contributor, preferably hosted on Icinga Exchange.
If patches or bugs are raised to an contributed plugin, we will start communications with the
original contributor, but seek to remove the plugin from our distribution.
@@ -824,11 +824,11 @@ setup the tests. Run "make test" to run all the tests.
New plugins
If you would like others to use your plugins, please add it to
- the official 3rd party plugin repository,
- Monitoring Exchange.
+ the official 3rd party plugin repository,
+ Icinga Exchange.
- We are not accepting requests for inclusion of plugins into
+ We are not accepting requests for inclusion of plugins into
our distribution at the moment, but when we do, these are the minimum
requirements:
@@ -843,9 +843,9 @@ setup the tests. Run "make test" to run all the tests.
--timeout, --warning, --critical)
- It is determined to be not redundant (for instance, we would not
- add a new version of check_disk just because someone had provide
- a plugin that had perf checking - we would incorporate the features
+ It is determined to be not redundant (for instance, we would not
+ add a new version of check_disk just because someone had provide
+ a plugin that had perf checking - we would incorporate the features
into an exisiting plugin)
@@ -857,7 +857,7 @@ setup the tests. Run "make test" to run all the tests.
utils (perl or c or sh) rather than using its own
- Includes patches to configure.in if required (via the EXTRAS list if
+ Includes patches to configure.in if required (via the EXTRAS list if
it will only work on some platforms)
@@ -870,5 +870,5 @@ utils (perl or c or sh) rather than using its own
-
+
--
cgit v1.2.3