summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2011-05-06 08:13:20 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2011-05-06 08:13:20 -0400
commita4de0e44bd10761f5ec7d948fd0a3824720a90f2 (patch)
treedf582678a12f77a29fede1965727fb27c94ecbe1 /doc
parente38ea05100ddf670898f1d11ffc09b9d44435f27 (diff)
downloadbcfg2-a4de0e44bd10761f5ec7d948fd0a3824720a90f2.tar.gz
bcfg2-a4de0e44bd10761f5ec7d948fd0a3824720a90f2.tar.bz2
bcfg2-a4de0e44bd10761f5ec7d948fd0a3824720a90f2.zip
Rewrote NagiosGen config to use NagiosGen/config.xml, which
understands <Group> and <Client> tags, rather than the client-specific Properties/NagiosGen.xml and the group-specific but limited NagiosGen/parents.xml. Includes schema and bcfg2-lint updates necessary. Wrote conversion tool, nagiosgen-convert.py, which converts everything but the <default/> tag in the old NagiosGen.xml, which cannot be reasonably converted to StructFile format. Also removed a _lot_ of string modification in NagiosGen.py, which should make it a fair bit faster.
Diffstat (limited to 'doc')
-rw-r--r--doc/server/plugins/generators/nagiosgen.txt31
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/server/plugins/generators/nagiosgen.txt b/doc/server/plugins/generators/nagiosgen.txt
index 196f1e76b..f3dc7823c 100644
--- a/doc/server/plugins/generators/nagiosgen.txt
+++ b/doc/server/plugins/generators/nagiosgen.txt
@@ -169,3 +169,34 @@ Note that some of these files are built on demand, each time a client
in group "nagios-server" checks in with the Bcfg2 server. Local nagios
instances can be configured to use the NagiosGen directory in the Bcfg2
repository directly.
+
+Fine-Grained Configuration
+==========================
+
+NagiosGen can be configured in excruciating detail by editing
+``NagiosGen/config.xml``, which will let you set individual Nagios
+options for hosts or groups. E.g.:
+
+.. code-block:: xml
+
+ <NagiosGen>
+ <Group name="datacenter-2">
+ <Option name="parents">dc-2-switch</Option>
+ <Group>
+ <Group name="non-production">
+ <Option name="notification_period">workhours</Option>
+ <Option name="notification_options">d</Option>
+ </Group>
+ <Client name="foo.example.com">
+ <Option name="max_check_attempts">10</Option>
+ </Client>
+ </NagiosGen>
+
+Obviously the sort of fine-grained control you get from this overlaps
+to some degree with Nagios' own templating, so use it wisely and in
+moderation.
+
+``NagiosGen/config.xml`` replaces the files
+``Properties/NagiosGen.xml`` and ``NagiosGen/parents.xml`` in older
+versions of Bcfg2; your old configs can be migrated using the
+``nagiosgen-convert.py`` tool.