diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/developer-guidelines.sgml | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/doc/developer-guidelines.sgml b/doc/developer-guidelines.sgml index e7754f4..599b2a1 100644 --- a/doc/developer-guidelines.sgml +++ b/doc/developer-guidelines.sgml | |||
@@ -83,10 +83,18 @@ | |||
83 | STDOUT and not print to STDERR.</para> | 83 | STDOUT and not print to STDERR.</para> |
84 | 84 | ||
85 | <section><title>Print only one line of text</title> | 85 | <section><title>Print only one line of text</title> |
86 | <para>Nagios will only grab the first line of text from STDOUT | 86 | <para>Starting with version 3, Nagios will process plugins' multiline |
87 | when it notifies contacts about potential problems. If you print | 87 | output, which should be formatted as:</para> |
88 | multiple lines, you're out of luck (though this will be a feature of | 88 | <literallayout> |
89 | Nagios 3). Remember, keep your output short and to the point.</para> | 89 | SERVICE STATUS: First line of output | First part of performance data |
90 | Any number of subsequent lines of output, but note that buffers | ||
91 | may have a limited size | Second part of performance data, which | ||
92 | may have continuation lines, too | ||
93 | </literallayout> | ||
94 | <para>Note, however, that the default configs still do not include | ||
95 | the output's continuation lines into the notifications sent when | ||
96 | Nagios notifies contacts about potential problems. | ||
97 | Thus, keep your output short and to the point.</para> | ||
90 | 98 | ||
91 | <para>Output should be in the format:</para> | 99 | <para>Output should be in the format:</para> |
92 | <literallayout> | 100 | <literallayout> |
@@ -269,10 +277,6 @@ | |||
269 | <entry>@10:20</entry> | 277 | <entry>@10:20</entry> |
270 | <entry>≥ 10 and ≤ 20, (inside the range of {10 .. 20})</entry> | 278 | <entry>≥ 10 and ≤ 20, (inside the range of {10 .. 20})</entry> |
271 | </row> | 279 | </row> |
272 | <row> | ||
273 | <entry>10</entry> | ||
274 | <entry>< 0 or > 10, (outside the range of {0 .. 10})</entry> | ||
275 | </row> | ||
276 | </tbody> | 280 | </tbody> |
277 | </tgroup> | 281 | </tgroup> |
278 | </table> | 282 | </table> |
@@ -319,10 +323,14 @@ | |||
319 | </section> | 323 | </section> |
320 | 324 | ||
321 | <section><title>Performance data</title> | 325 | <section><title>Performance data</title> |
322 | <para>Performance data is defined by Nagios as "everything after the | of the plugin output" - | 326 | <para>Nagios 3 and newer will concatenate the parts following a "|" in a) the first |
323 | please refer to Nagios documentation for information on capturing this data to logfiles. | 327 | line output by the plugin, and b) in the second to last line, into a string it |
324 | However, it is the responsibility of the plugin writer to ensure the | 328 | passes to whatever performance data processing it has configured. (Note that it |
325 | performance data is in a "Nagios plugins" format. | 329 | currently does not insert additional whitespace between both, so the plugin needs |
330 | to provide some to prevent the last pair of a) and the first of b) getting run | ||
331 | together.) Please refer to the Nagios documentation for information on how to | ||
332 | configure such processing. However, it is the responsibility of the plugin writer | ||
333 | to ensure the performance data is in a "Nagios plugins" format. | ||
326 | This is the expected format:</para> | 334 | This is the expected format:</para> |
327 | 335 | ||
328 | <literallayout> | 336 | <literallayout> |
@@ -351,7 +359,8 @@ | |||
351 | <listitem><para>min and max are not required if UOM=%</para> | 359 | <listitem><para>min and max are not required if UOM=%</para> |
352 | </listitem> | 360 | </listitem> |
353 | <listitem><para>value, min and max in class [-0-9.]. Must all be the | 361 | <listitem><para>value, min and max in class [-0-9.]. Must all be the |
354 | same UOM</para> | 362 | same UOM. value may be a literal "U" instead, this would indicate that the |
363 | actual value couldn't be determined</para> | ||
355 | </listitem> | 364 | </listitem> |
356 | <listitem><para>warn and crit are in the range format (see | 365 | <listitem><para>warn and crit are in the range format (see |
357 | <xref linkend="thresholdformat">). Must be the same UOM</para> | 366 | <xref linkend="thresholdformat">). Must be the same UOM</para> |