[icinga-checkins] icinga.org: icinga-core/mfriedrich/cgis: config: introduce conf. d as place for own configs #2360

git at icinga.org git at icinga.org
Sat Feb 25 21:21:25 CET 2012


Module: icinga-core
Branch: mfriedrich/cgis
Commit: d5d0a47079e9f70e7c07844a340adf87ee80e9db
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=d5d0a47079e9f70e7c07844a340adf87ee80e9db

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Sat Feb 25 21:03:29 2012 +0100

config: introduce conf.d as place for own configs #2360

revamp the hints for cfg_dir and cfg_file as well

refs #2360

---

 Changelog                   |    5 +++++
 Makefile.in                 |    1 +
 sample-config/icinga.cfg.in |   28 +++++++++++++++++-----------
 3 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/Changelog b/Changelog
index b53fc19..ee1648c 100644
--- a/Changelog
+++ b/Changelog
@@ -36,6 +36,8 @@ ENHANCEMENTS
 * install: add configure target --with-eventhandler-dir and "make install-eventhandlers" for contrib/eventhandlers #2352
 * install: add --enable-cgi-log to configure to enable cgi logging during build #2364
 
+* config: introduce conf.d as place for own configs #2360
+
 * icinga.spec: use --with-plugin-dir instead of --libexexdir for nagios plugins dir #2344
 * icinga.spec: make aware of the change of idomod.o location and changed extension (now .so) #2350
 * icinga.spec: add "README LICENSE Changelog UPGRADING" to all packages as docs (thx Michael Gruener) #2212
@@ -90,6 +92,9 @@ CHANGES
 * install: --enable-cgi-log #2364
 	** enables cgi logging (EXPERIMENTAL)
 
+* config: $sysconfdir/conf.d #2360
+
+
 
 1.6.1 - 02/12/2011
 
diff --git a/Makefile.in b/Makefile.in
index c6971f9..2a9aaba 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -411,6 +411,7 @@ install-basic:
 install-config:
 	$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
 	$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/objects
+	$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/conf.d
 	$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/modules
 	$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/icinga.cfg $(DESTDIR)$(CFGDIR)/icinga.cfg
 	$(INSTALL) -b -m 660 $(INSTALL_OPTS) sample-config/resource.cfg $(DESTDIR)$(CFGDIR)/resource.cfg
diff --git a/sample-config/icinga.cfg.in b/sample-config/icinga.cfg.in
index 89c9c58..5cfb57a 100644
--- a/sample-config/icinga.cfg.in
+++ b/sample-config/icinga.cfg.in
@@ -21,8 +21,23 @@ log_file=@LOGDIR@/icinga.log
 # OBJECT CONFIGURATION FILE(S)
 # These are the object configuration files in which you define hosts,
 # host groups, contacts, contact groups, services, etc.
-# You can split your object definitions across several config files
-# if you wish (as shown below), or keep them all in a single config file.
+# Hint: Check the docs/wiki on how to monitor remote hosts with different
+# transport methods and plugins
+
+# You can tell Icinga to process all config files (with a .cfg
+# extension) in a particular directory recursively by using the
+# cfg_dir directive as shown below with conf.d
+
+cfg_dir=@sysconfdir@/conf.d
+
+# or you can split your object definitions across several config files
+# and include them one by one - see the provided sample config
+# in objects/
+#
+# ATTENTION: do not mix cfg_file and cfg_dir such as
+# cfg_file=foo/bar.cfg
+# cfg_dir=foo
+# this will include bar.cfg 2 times and lead to config verification errors.
 
 # You can specify individual object config files as shown below:
 cfg_file=@sysconfdir@/objects/commands.cfg
@@ -45,15 +60,6 @@ cfg_file=@sysconfdir@/objects/localhost.cfg
 # Definitions for ido2db process checks
 #cfg_file=@sysconfdir@/objects/ido2db_check_proc.cfg
 
-# You can also tell Icinga to process all config files (with a .cfg
-# extension) in a particular directory by using the cfg_dir
-# directive as shown below:
-
-#cfg_dir=@sysconfdir@/servers
-#cfg_dir=@sysconfdir@/printers
-#cfg_dir=@sysconfdir@/switches
-#cfg_dir=@sysconfdir@/routers
-
 # Definitions for broker modules like idoutils.cfg
 cfg_dir=@sysconfdir@/modules
 





More information about the icinga-checkins mailing list