/var/cache/icinga2 |Performance data files and status.dat/objects.cache.
/var/lib/icinga2 |The Icinga 2 state file.
-#### Configuration
+#### icinga2.conf
-An example configuration file is installed for you in /etc/icinga2/icinga2.conf.
+An example configuration file is installed for you in */etc/icinga2/icinga2.conf*.
-Here's a brief description of the concepts the example configuration file
-introduces:
+Here's a brief description of the example config:
/**
* Icinga 2 configuration file
file is distributed as part of Icinga 2 and provides a number of useful templates
and constants you can use to configure your services.
+ /**
+ * The features-available directory contains a number of configuration
+ * files for features which can be enabled and disabled using the
+ * i2enfeature / i2disfeature tools. These two tools work by creating
+ * and removing symbolic links in the features-enabled directory.
+ */
+ include "features-enabled/*.conf"
+
+The Icinga 2 example configuration includes a number of configuration files for
+some of Icinga 2's features. These are installed in the *features-available*
+directory and can be enabled and disabled using the *i2enfeature* and
+*i2disfeature* tools.
+
+This include directive takes care of including the configuration files for all
+the features which have been enabled with *i2enfeature*. See
+[Enabling/Disabling Features](#features) for more details.
+
+ /**
+ * 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"
+
+You can put your own configuration files in the *conf.d* directory. This
+directive makes sure that all of your own configuration files are included.
+
+#### macros.conf
+
+The *conf.d/macros.conf* file can be used to define global macros:
+
/**
* Global macros
*/
Icinga 2 lets you define free-form macros. The IcingaMacros variable can be used
to define global macros which are available in all command definitions.
- /**
- * 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"
-
-Some of Icinga 2's functionality is available in separate libraries. These
-libraries usually implement their own object types that can be used to configure
-what you want the library to do.
-
- object StatusDataWriter "status" { }
- object ExternalCommandListener "command" { }
- object CompatLogger "compat-log" { }
-
-Those three object types are provided by the *compat* library:
+#### localhost.conf
- Type | Description
- -------------------------|-------------------------
- StatusDataWriter | Responsible for writing the status.dat and objects.cache files.
- ExternalCommandListener | Implements the command pipe which is used by the CGIs to send commands to Icinga 2.
- CompatLogger | Writes log files in a format that is compatible with Icinga 1.x.
+The *conf.d/localhost.conf* file contains our first host definition:
/**
- * And finally we define some host that should be checked.
+ * Our first host.
*/
object Host "localhost" {
services["ping4"] = {