docs/Makefile
etc/Makefile
etc/icinga2/Makefile
+etc/icinga2/conf.d/Makefile
+etc/icinga2/mods-available/Makefile
etc/init.d/Makefile
icinga-app/Makefile
itl/Makefile
third-party/execvpe/Makefile
third-party/mmatch/Makefile
tools/Makefile
+tools/i2modconf
tools/mkembedconfig/Makefile
])
AC_OUTPUT([
--- /dev/null
+# Getting Started
+
+## Installation
+
+This tutorial is a step-by-step introduction to installing Icinga 2 and
+the standalone version of the Icinga 1.x classic web interface. It assumes
+that you are familiar with the system you're installing Icinga 2 on.
-# Getting Started
-
-## Installation
-
-This tutorial is a step-by-step introduction to installing Icinga 2 and
-the standalone version of the Icinga 1.x classic web interface. It assumes
-that you are familiar with the system you're installing Icinga 2 on.
-
### Setting up Icinga 2
In order to get started with Icinga 2 you will have to install it. The
are available for your favorite distribution.
In case you're running a distribution for which Icinga 2 packages are
-not yet available you will have to check out the Icinga 2 Git repository
-from git://git.icinga.org/icinga2 and read the *INSTALL* file.
+not yet available you will have to use the release tarball which you
+can download from the [Icinga website](https://www.icinga.org/). The
+release tarballs contain an *INSTALL* file with further information.
#### Installation Paths
The *macros* attribute can be used to define macros that are available for all
services which belong to this host. Most of the templates in the Icinga Template
Library require an *address* macro.
-
-### Setting up Icinga Classic UI
-
-Icinga 2 can write *status.dat* and *objects.cache* files in the format that
-is supported by the Icinga 1.x Classic UI. External commands (a.k.a. the
-"command pipe") are also supported. It also supports writing Icinga 1.x
-log files which are required for the reporting functionality in the Classic UI.
-
-These features are implemented as part of the *compat* library and are enabled
-by default in the example configuration file.
-
-You should be able to find the *status.dat* and *objects.cache* files in
-*/var/cache/icinga2*. The log files can be found in */var/log/icinga2/compat*.
-The command pipe can be found in */var/run/icinga2*.
-
-#### Installing Icinga Classic UI
-
-You can install Icinga 1.x Classic UI in standalone mode using the
-following commands:
-
- $ wget http://downloads.sourceforge.net/project/icinga/icinga/1.9.3/icinga-1.9.3.tar.gz
- $ tar xzf icinga-1.9.3.tar.gz ; cd icinga-1.9.3
- $ ./configure --enable-classicui-standalone --prefix=/usr/local/icinga2-classicui
- $ make classicui-standalone
- $ sudo make install classicui-standalone install-webconf-auth
- $ sudo service apache2 restart
-
-> **Note**
->
-> A detailed guide on installing Icinga 1.x Classic UI Standalone can be
-> found on the Icinga Wiki here:
-> [https://wiki.icinga.org/display/howtos/Setting+up+Icinga+Classic+UI+Standalone](https://wiki.icinga.org/display/howtos/Setting+up+Icinga+Classic+UI+Standalone)
-
-#### Configuring the Classic UI
-
-After installing the Classic UI you will need to update the following
-settings in your *cgi.cfg* configuration file in the *STANDALONE (ICINGA 2)
-OPTIONS* section:
-
- Configuration Setting |Value
- ------------------------------------|------------------------------------
- object\_cache\_file |/var/cache/icinga2/objects.cache
- status\_file |/var/cache/icinga2/status.dat
- resource\_file |-
- command\_file |/var/run/icinga2/icinga2.cmd
- check\_external\_commands |1
- interval\_length |60
- status\_update\_interval |10
- log\_file |/var/log/icinga2/compat/icinga.log
- log\_rotation\_method |h
- log\_archive\_path |/var/log/icinga2/compat/archives
- date\_format |us
- ------------------------------------ ------------------------------------
-
-> **Note**
->
-> Depending on how you installed Icinga 2 some of those paths and options
-> might be different.
-
-In order for commands to work you will need to grant the web server
-write permissions for the command pipe:
-
- # chgrp www-data /var/run/icinga2/icinga2.cmd
- # chmod 660 /var/run/icinga2/icinga2.cmd
-
-> **Note**
->
-> Change "www-data" to the group the Apache HTTP daemon is running as.
-
-Verify that your Icinga 1.x Classic UI works by browsing to your Classic
-UI installation URL, e.g.
-[http://localhost/icinga](http://localhost/icinga)
-
-### Configuring IDO
-
-TODO
-
-## Running Icinga
-
-TODO
-
-## Monitoring Basics
-
-### Hosts
-
-TODO
-
-### Services
-
-TODO
-
-### Check Commands
-
-TODO
-
-### Macros
-
-TODO
-
-## Using Templates
-
-TODO
-
-## Groups
-
-TODO
-
-## Host/Service Dependencies
-
-TODO
-
-## Time Periods
-
-TODO
-
-## Notifications
-
-TODO
--- /dev/null
+### Setting up Icinga Classic UI
+
+Icinga 2 can write *status.dat* and *objects.cache* files in the format that
+is supported by the Icinga 1.x Classic UI. External commands (a.k.a. the
+"command pipe") are also supported. It also supports writing Icinga 1.x
+log files which are required for the reporting functionality in the Classic UI.
+
+These features are implemented as part of the *compat* library and are enabled
+by default in the example configuration file.
+
+You should be able to find the *status.dat* and *objects.cache* files in
+*/var/cache/icinga2*. The log files can be found in */var/log/icinga2/compat*.
+The command pipe can be found in */var/run/icinga2*.
+
+#### Installing Icinga Classic UI
+
+You can install Icinga 1.x Classic UI in standalone mode using the
+following commands:
+
+ $ wget http://downloads.sourceforge.net/project/icinga/icinga/1.9.3/icinga-1.9.3.tar.gz
+ $ tar xzf icinga-1.9.3.tar.gz ; cd icinga-1.9.3
+ $ ./configure --enable-classicui-standalone --prefix=/usr/local/icinga2-classicui
+ $ make classicui-standalone
+ $ sudo make install classicui-standalone install-webconf-auth
+ $ sudo service apache2 restart
+
+> **Note**
+>
+> A detailed guide on installing Icinga 1.x Classic UI Standalone can be
+> found on the Icinga Wiki here:
+> [https://wiki.icinga.org/display/howtos/Setting+up+Icinga+Classic+UI+Standalone](https://wiki.icinga.org/display/howtos/Setting+up+Icinga+Classic+UI+Standalone)
+
+#### Configuring the Classic UI
+
+After installing the Classic UI you will need to update the following
+settings in your *cgi.cfg* configuration file in the *STANDALONE (ICINGA 2)
+OPTIONS* section:
+
+ Configuration Setting |Value
+ ------------------------------------|------------------------------------
+ object\_cache\_file |/var/cache/icinga2/objects.cache
+ status\_file |/var/cache/icinga2/status.dat
+ resource\_file |-
+ command\_file |/var/run/icinga2/icinga2.cmd
+ check\_external\_commands |1
+ interval\_length |60
+ status\_update\_interval |10
+ log\_file |/var/log/icinga2/compat/icinga.log
+ log\_rotation\_method |h
+ log\_archive\_path |/var/log/icinga2/compat/archives
+ date\_format |us
+ ------------------------------------ ------------------------------------
+
+> **Note**
+>
+> Depending on how you installed Icinga 2 some of those paths and options
+> might be different.
+
+In order for commands to work you will need to grant the web server
+write permissions for the command pipe:
+
+ # chgrp www-data /var/run/icinga2/icinga2.cmd
+ # chmod 660 /var/run/icinga2/icinga2.cmd
+
+> **Note**
+>
+> Change "www-data" to the group the Apache HTTP daemon is running as.
+
+Verify that your Icinga 1.x Classic UI works by browsing to your Classic
+UI installation URL, e.g.
+[http://localhost/icinga](http://localhost/icinga)
--- /dev/null
+### Setting up Check Plugins
+
+On its own Icinga 2 does not know how to check external services. The
+[Nagios Plugins Project](https://www.nagios-plugins.org/) provides an extensive
+set of *plugins* which can be used by Icinga 2 to check whether services are
+working properly.
+
+The recommended way of installing these standard plugins is to use your
+distribution's package manager. For your convenience here is a list of package
+names for some of the more popular operating systems/distributions:
+
+OS/Distribution | Package Name | Installation Path
+----------------|----------------|---------------------------
+RHEL/CentOS | nagios-plugins | /usr/lib/nagios/plugins
+Debian | nagios-plugins | /usr/lib/nagios/plugins
+FreeBSD | nagios-plugins | /usr/local/libexec/nagios
+OS X (MacPorts) | nagios-plugins | /opt/local/libexec
+
+Depending on which directory your plugins are installed into you may need to
+update the *plugindir* macro in your Icinga 2 configuration. This macro is used
+by the service templates contained in the Icinga Template Library to determine
+where to find the plugin binaries.
\ No newline at end of file
--- /dev/null
+### Configuring IDO
+
+TODO
--- /dev/null
+## Running Icinga
+
+TODO
--- /dev/null
+## Monitoring Basics
+
+### Hosts
+
+TODO
+
+### Services
+
+TODO
+
+### Check Commands
+
+TODO
+
+### Macros
+
+TODO
+
+## Using Templates
+
+TODO
+
+## Groups
+
+TODO
+
+## Host/Service Dependencies
+
+TODO
+
+## Time Periods
+
+TODO
+
+## Notifications
+
+TODO
+
> Constant expressions are evaluated as soon as they're encountered in
> the configuration file.
-### <a id="comments" /> Comments
+### <a id="comments"></a> Comments
The Icinga 2 configuration format supports C/C++-style comments.
--- /dev/null
+# Advanced Topics
+
+## External Commands
+
+TODO
+
+## Event Handlers
+
+TODO
+
+## Cluster
+
+TODO
+## Process this file with automake to produce Makefile.in
+
+SUBDIRS = \
+ conf.d \
+ mods-available
+
icinga2confdir = $(sysconfdir)/icinga2
-icinga2conf_DATA = \
- icinga2.conf.dist
-EXTRA_DIST = $(icinga2conf_DATA)
+CONFIG_FILES = \
+ icinga2.conf
+
+install-data-local:
+ @for file in $(CONFIG_FILES); do \
+ if [ ! -e $(icinga2confdir)/$$file ]; then \
+ $(INSTALL_DATA) $$file $(icinga2confdir)/$$file; \
+ fi; \
+ done
+
+EXTRA_DIST = $(CONFIG_FILES)
+
+install-exec-hook:
+ @cd $(icinga2confdir) && \
+ if [ ! -e mods-enabled ]; then \
+ $(MKDIR_P) mods-enabled && \
+ $(LN_S) ../mods-available/compat.conf mods-enabled/; \
+ fi
--- /dev/null
+## Process this file with automake to produce Makefile.in
+
+icinga2confdir = $(sysconfdir)/icinga2/conf.d
+
+CONFIG_FILES = \
+ localhost.conf \
+ macros.conf
+
+install-data-local:
+ @for file in $(CONFIG_FILES); do \
+ if [ ! -e $(icinga2confdir)/$$file ]; then \
+ $(INSTALL_DATA) $$file $(icinga2confdir)/$$file; \
+ fi; \
+ done
+
+EXTRA_DIST = $(CONFIG_FILES)
--- /dev/null
+/**
+ * And finally we define some host that should be checked.
+ */
+object Host "localhost" {
+ services["ping4"] = {
+ templates = [ "ping4" ]
+ },
+
+ services["ping6"] = {
+ templates = [ "ping6" ]
+ },
+
+ services["http"] = {
+ templates = [ "http_ip" ]
+ },
+
+ services["ssh"] = {
+ templates = [ "ssh" ]
+ },
+
+ services["load"] = {
+ templates = [ "load" ]
+ },
+
+ services["processes"] = {
+ templates = [ "processes" ]
+ },
+
+ services["users"] = {
+ templates = [ "users" ]
+ },
+
+ services["disk"] = {
+ templates = [ "disk" ]
+ },
+
+ macros = {
+ address = "127.0.0.1",
+ address6 = "::1",
+ },
+
+ check = "ping4",
+}
--- /dev/null
+/**
+ * Global macros
+ */
+set IcingaMacros = {
+ plugindir = "/usr/lib/nagios/plugins"
+}
+
--- /dev/null
+/**
+ * Icinga 2 configuration file
+ * - this is where you define settings for the Icinga application including
+ * which hosts/services to check.
+ *
+ * For an overview of all available configuration options please refer
+ * to the documentation that is distributed as part of Icinga 2.
+ */
+
+include <itl/itl.conf>
+include <itl/standalone.conf>
+
+/**
+ * The mods-available directory contains a number of configuration
+ * files for features which can be enabled and disabled using the
+ * i2enmod / i2dismod tools. These two tools work by creating
+ * and removing symbolic links in the mods-enabled directory.
+ */
+include "mods-enabled/*.conf"
+
+/**
+ * Although in theory you could define all your objects in this file
+ * the preferred way is to create separate files in the conf.d
+ * directory.
+ */
+include "conf.d/*.conf"
+
+++ /dev/null
-/**
- * Icinga 2 configuration file
- * - this is where you define settings for the Icinga application including
- * which hosts/services to check.
- *
- * The docs/icinga2-config.adoc file in the source tarball has a detailed
- * description of what configuration options are available.
- */
-
-include <itl/itl.conf>
-include <itl/standalone.conf>
-
-/**
- * Global macros
- */
-set IcingaMacros = {
- plugindir = "/usr/local/icinga/libexec"
-}
-
-/**
- * The compat library periodically updates the status.dat and objects.cache
- * files. These are used by the Icinga 1.x CGIs to display the state of
- * hosts and services. CompatLog writeis the Icinga 1.x icinga.log and archives.
- */
-library "compat"
-object StatusDataWriter "status" { }
-object ExternalCommandListener "command" { }
-object CompatLogger "compat-log" { }
-
-/**
- * And finally we define some host that should be checked.
- */
-object Host "localhost" {
- services["ping4"] = {
- templates = [ "ping4" ]
- },
-
- services["ping6"] = {
- templates = [ "ping6" ]
- },
-
- services["http"] = {
- templates = [ "http_ip" ]
- },
-
- services["ssh"] = {
- templates = [ "ssh" ]
- },
-
- services["load"] = {
- templates = [ "load" ]
- },
-
- services["processes"] = {
- templates = [ "processes" ]
- },
-
- services["users"] = {
- templates = [ "users" ]
- },
-
- services["disk"] = {
- templates = [ "disk" ]
- },
-
- macros = {
- address = "127.0.0.1",
- address6 = "::1",
- },
-
- check = "ping4",
-}
--- /dev/null
+## Process this file with automake to produce Makefile.in
+
+icinga2confdir = $(sysconfdir)/icinga2/mods-available
+icinga2conf_DATA = \
+ compat.load
+
+CONFIG_FILES = \
+ compat.conf
+
+install-data-local:
+ @for file in $(CONFIG_FILES); do \
+ if [ ! -e $(icinga2confdir)/$$file ]; then \
+ $(INSTALL_DATA) $$file $(icinga2confdir)/$$file; \
+ fi; \
+ done
+
+EXTRA_DIST = $(CONFIG_FILES) $(icinga2conf_DATA)
--- /dev/null
+/**
+ * The compat library periodically updates the status.dat and objects.cache
+ * files. These are used by the Icinga 1.x CGIs to display the state of
+ * hosts and services. CompatLog writeis the Icinga 1.x icinga.log and archives.
+ */
+
+include "compat.load"
+
+object StatusDataWriter "status" { }
+object ExternalCommandListener "command" { }
+object CompatLogger "compat-log" { }
+
--- /dev/null
+library "compat"
+
-#line 3 "config_lexer.cc"
+#line 3 "../../../lib/config/config_lexer.cc"
#define YY_INT_ALIGNED short int
-#line 680 "config_lexer.cc"
+#line 680 "../../../lib/config/config_lexer.cc"
#define INITIAL 0
#define C_COMMENT 1
lex_buf string_buf;
-#line 937 "config_lexer.cc"
+#line 937 "../../../lib/config/config_lexer.cc"
yylval = yylval_param;
#line 230 "config_lexer.ll"
ECHO;
YY_BREAK
-#line 1386 "config_lexer.cc"
+#line 1386 "../../../lib/config/config_lexer.cc"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(C_COMMENT):
case YY_STATE_EOF(STRING):
-
SUBDIRS = \
mkembedconfig
+
+bin_SCRIPTS = i2modconf
+CLEANFILES = $(bin_SCRIPTS)
+
+EXTRA_DIST = i2modconf.in
+
+install-exec-hook:
+ $(LN_S) -f i2modconf $(bindir)/i2enmod
+ $(LN_S) -f i2modconf $(bindir)/i2dismod