aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2013-08-22 20:45:53 +0200
committerGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2013-08-22 20:45:53 +0200
commit912a2eaf023814027ecec4805746b746ddfd5262 (patch)
tree794a0a99e315e9f7ba52a0f165f64487e18f61d4 /doc
parentc542ca9136736df33ad7ef688d54d12e0044c3bc (diff)
downloadmonitoring-plugins-912a2eaf023814027ecec4805746b746ddfd5262.tar.gz
developer-guidelines.sgml: Multiline output
Document the multiline output format properly. Thanks to Jochen Bern for providing this patch.
Diffstat (limited to 'doc')
-rw-r--r--doc/developer-guidelines.sgml28
1 files changed, 20 insertions, 8 deletions
diff --git a/doc/developer-guidelines.sgml b/doc/developer-guidelines.sgml
index 6b6f7357..599b2a16 100644
--- a/doc/developer-guidelines.sgml
+++ b/doc/developer-guidelines.sgml
@@ -83,10 +83,18 @@
STDOUT and not print to STDERR.</para>
<section><title>Print only one line of text</title>
- <para>Nagios will only grab the first line of text from STDOUT
- when it notifies contacts about potential problems. If you print
- multiple lines, you're out of luck (though this will be a feature of
- Nagios 3). Remember, keep your output short and to the point.</para>
+ <para>Starting with version 3, Nagios will process plugins' multiline
+ output, which should be formatted as:</para>
+ <literallayout>
+ SERVICE STATUS: First line of output | First part of performance data
+ Any number of subsequent lines of output, but note that buffers
+ may have a limited size | Second part of performance data, which
+ may have continuation lines, too
+ </literallayout>
+ <para>Note, however, that the default configs still do not include
+ the output's continuation lines into the notifications sent when
+ Nagios notifies contacts about potential problems.
+ Thus, keep your output short and to the point.</para>
<para>Output should be in the format:</para>
<literallayout>
@@ -315,10 +323,14 @@
</section>
<section><title>Performance data</title>
- <para>Performance data is defined by Nagios as "everything after the | of the plugin output" -
- please refer to Nagios documentation for information on capturing this data to logfiles.
- However, it is the responsibility of the plugin writer to ensure the
- performance data is in a "Nagios plugins" format.
+ <para>Nagios 3 and newer will concatenate the parts following a "|" in a) the first
+ line output by the plugin, and b) in the second to last line, into a string it
+ passes to whatever performance data processing it has configured. (Note that it
+ currently does not insert additional whitespace between both, so the plugin needs
+ to provide some to prevent the last pair of a) and the first of b) getting run
+ together.) Please refer to the Nagios documentation for information on how to
+ configure such processing. However, it is the responsibility of the plugin writer
+ to ensure the performance data is in a "Nagios plugins" format.
This is the expected format:</para>
<literallayout>