summaryrefslogtreecommitdiffstats
path: root/web/input/doc/check-many.md
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2014-01-12 23:48:22 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2014-01-12 23:48:22 (GMT)
commit2b27452e2a55869b0260df60ac338ca3fd094843 (patch)
tree8d1acbc998799bc12cc80447dd412f72778174bc /web/input/doc/check-many.md
parent41af5b4013ef5f7793465d1e7676f0211b5a30d0 (diff)
downloadsite-2b27452e2a55869b0260df60ac338ca3fd094843.tar.gz
Documentation: Add "Proposals"
Import the "check_many" proposal from our old web site, and add a "Proposals" section to the Documentation page. Also reference the "New Threshold Syntax" proposal from there (we didn't link to it before).
Diffstat (limited to 'web/input/doc/check-many.md')
-rw-r--r--web/input/doc/check-many.md90
1 files changed, 90 insertions, 0 deletions
diff --git a/web/input/doc/check-many.md b/web/input/doc/check-many.md
new file mode 100644
index 0000000..b34869c
--- /dev/null
+++ b/web/input/doc/check-many.md
@@ -0,0 +1,90 @@
1title: Check Aggregation
2parent: Documentation
3---
4
5# Check Aggregation: check\_many
6
7_Thomas Guyot-Sionnest, June 9, 2009_
8
9## Overview
10
11This proposal is for a simple plugin wrapper allowing aggregation and
12serialization of multiple checks.
13
14## Problem
15
16There is no easy way to configure a single Nagios service that aggregates
17multiple results together. Taking for example a standard `check_nagios`
18between servers, how can such checks be extended to cover additional
19components? Usually it involves writing a custom shell wrapper around them,
20or configuring all the checks separately and using `check_cluster` to
21aggregate them. There ought to be a better way …
22
23## Proposal
24
25Written in C, `check_many` would be a fairly simple and fast solution for this
26issue. The idea is a plugin that takes checks commands from `STDIN`; one
27command per line. It would run them and aggregate them according to
28processing preferences as configured in the plugin arguments.
29
30## Check Options
31
32The following options can be used to control plugin processing (grouped by
33category):
34
35### Command Parsing
36
37 -s, --shell=<always|never|auto>
38 Specify when a shell should be invoked for executing commands. "always"
39 invokes the shell for every command, "never" forces commands to be executed
40 directly, and "auto" (default) invokes the shell only if shell meta
41 characters are present in the check command. Unless -d (--delimiter) is
42 specified, any whitespace is used for separating arguments.
43
44 -d, --delimiter=CHARACTER
45 Delimiter to use for separating command arguments when shell is not used.
46 Implies --shell=never and is mutually exclusive with any other shell option.
47 Standard backslash escapes are allowed, except "\n".
48
49*Note:* Should we allow strings as delimiters?
50
51### Processing Option
52
53 -P, --process=<all|first-fail|first-ok>
54 By default, all commands are processed and the worst state is returned
55 ("all"). "first-fail" stops at the first non-ok check and returns it, while
56 "first-ok" stops at the first successful check and returns it. The latter
57 two override --status and --output and return the plugins's instead.
58
59 -f, --file=FILE
60 Read checks from FILE instead of STDIN.
61
62### Output Options
63
64 --output=<normal|oneline|status>
65 "normal" outputs Nagios v3+ multi-line result, first line being a summary of
66 the checks performed; "oneline" squeezes everything into a single line; and
67 "status" returns only a status line. This option has no effect with
68 --process=first-fail|first-ok.
69
70*Note:* How about allowing *n*th result?
71
72## Examples
73
74Aggregate multiple checks together:
75
76 $ echo '/path/check_http -H www.example.com
77 /path/check_http -H www.example.com -p 443' | /path/check_many
78
79Get list of checks from a file:
80
81 $ /path/check_many <~nagios/multiple_checks.txt
82 $ /path/check_many -f /home/nagios/multiple_checks.txt
83
84Using a delimiter:
85
86 $ echo '/path/check_foo:-H:example.com
87 /path/check_bar:-H:example.com:-s:$string with special chars;' \
88 | /path/check_many -d:
89
90<!--% # vim:set filetype=markdown textwidth=78 joinspaces: # %-->