1 # <a id="getting-started"></a> Getting Started
3 This tutorial is a step-by-step introduction to installing Icinga 2 and
4 available Icinga web interfaces. It assumes that you are familiar with
5 the system you're installing Icinga 2 on.
7 Details on troubleshooting problems can be found [here](#troubleshooting).
9 ## <a id="setting-up-icinga2"></a> Setting up Icinga 2
11 First off you will have to install Icinga 2. The preferred way of doing this
12 is to use the official package repositories depending on which operating system
13 and distribution you are running.
15 Distribution | Repository
16 ------------------------|---------------------------
17 Debian | [Upstream](https://packages.debian.org/sid/icinga2), [DebMon](http://debmon.org/packages/debmon-wheezy/icinga2), [Icinga Repository](http://packages.icinga.org/debian/)
18 Ubuntu | [Upstream](https://launchpad.net/ubuntu/+source/icinga2), [Icinga PPA](https://launchpad.net/~formorer/+archive/ubuntu/icinga), [Icinga Repository](http://packages.icinga.org/ubuntu/)
19 RHEL/CentOS | [Icinga Repository](http://packages.icinga.org/epel/)
20 OpenSUSE | [Icinga Repository](http://packages.icinga.org/openSUSE/), [Server Monitoring Repository](https://build.opensuse.org/package/show/server:monitoring/icinga2)
21 SLES | [Icinga Repository](http://packages.icinga.org/SUSE/)
22 Gentoo | [Upstream](http://packages.gentoo.org/package/net-analyzer/icinga2)
23 FreeBSD | [Upstream](http://www.freshports.org/net-mgmt/icinga2)
24 ArchLinux | [Upstream](https://aur.archlinux.org/packages/icinga2)
26 Packages for distributions other than the ones listed above may also be
27 available. Please contact your distribution packagers.
29 ### <a id="installing-requirements"></a> Installing Requirements for Icinga 2
31 You need to add the Icinga repository to your package management configuration.
32 Below is a list with examples for the various distributions.
36 # wget -O - http://debmon.org/debmon/repo.key 2>/dev/null | apt-key add -
37 # cat >/etc/apt/sources.list.d/debmon.list<<EOF
38 deb http://debmon.org/debmon debmon-wheezy main
44 # add-apt-repository ppa:formorer/icinga
49 # rpm --import http://packages.icinga.org/icinga.key
50 # wget http://packages.icinga.org/epel/ICINGA-release.repo -O /etc/yum.repos.d/ICINGA-release.repo
55 # wget http://packages.icinga.org/fedora/ICINGA-release.repo -O /etc/yum.repos.d/ICINGA-release.repo
60 # zypper ar http://packages.icinga.org/SUSE/ICINGA-release.repo
65 # zypper ar http://packages.icinga.org/openSUSE/ICINGA-release.repo
68 The packages for RHEL/CentOS depend on other packages which are distributed
69 as part of the [EPEL repository](http://fedoraproject.org/wiki/EPEL). Please
70 make sure to enable this repository by following
71 [these instructions](#http://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F).
73 ### <a id="installing-icinga2"></a> Installing Icinga 2
75 You can install Icinga 2 by using your distribution's package manager
76 to install the `icinga2` package.
80 # apt-get install icinga2
88 # zypper install icinga2
90 On RHEL/CentOS and SLES you will need to use `chkconfig` to enable the
91 `icinga2` service. You can manually start Icinga 2 using `service icinga2 start`.
93 # chkconfig icinga2 on
94 # service icinga2 start
96 RHEL/CentOS 7 use [Systemd](#systemd-service) with `systemctl {enable,start} icinga2`.
98 # systemctl enable icinga2
99 # systemctl start icinga2
101 Some parts of Icinga 2's functionality are available as separate packages:
104 ------------------------|--------------------------------
105 icinga2-ido-mysql | [DB IDO](#configuring-db-ido) provider module for MySQL
106 icinga2-ido-pgsql | [DB IDO](#configuring-db-ido) provider module for PostgreSQL
108 If you're running a distribution for which Icinga 2 packages are
109 not yet available you will need to use the release tarball which you
110 can download from the [Icinga website](https://www.icinga.org/). The
111 release tarballs contain an `INSTALL` file with further instructions.
113 ### <a id="installation-enabled-features"></a> Enabled Features during Installation
115 The default installation will enable three features required for a basic
116 Icinga 2 installation:
118 * `checker` for executing checks
119 * `notification` for sending notifications
120 * `mainlog` for writing the `icinga2.log ` file
122 Verify that by calling `icinga2-enable-feature` without any additional parameters
123 and enable the missing features, if any.
125 # icinga2-enable-feature
126 Syntax: icinga2-enable-feature <features separated with whitespaces>
127 Example: icinga2-enable-feature checker notification mainlog
128 Enables the specified feature(s).
130 Available features: api checker command compatlog debuglog graphite icingastatus ido-mysql ido-pgsql livestatus mainlog notification perfdata statusdata syslog
131 Enabled features: checker mainlog notification
133 ### <a id="installation-paths"></a> Installation Paths
135 By default Icinga 2 uses the following files and directories:
138 ------------------------------------|------------------------------------
139 /etc/icinga2 | Contains Icinga 2 configuration files.
140 /etc/init.d/icinga2 | The Icinga 2 init script.
141 /usr/bin/icinga2-* | Migration and certificate build scripts.
142 /usr/sbin/icinga2* | The Icinga 2 binary and feature enable/disable scripts.
143 /usr/share/doc/icinga2 | Documentation files that come with Icinga 2.
144 /usr/share/icinga2/include | The Icinga Template Library and plugin command configuration.
145 /var/run/icinga2 | PID file.
146 /var/run/icinga2/cmd | Command pipe and Livestatus socket.
147 /var/cache/icinga2 | status.dat/objects.cache.
148 /var/spool/icinga2 | Used for performance data spool files.
149 /var/lib/icinga2 | Icinga 2 state file, cluster feature replay log and configuration files.
150 /var/log/icinga2 | Log file location and compat/ directory for the CompatLogger feature.
152 ## <a id="setting-up-check-plugins"></a> Setting up Check Plugins
154 Without plugins Icinga 2 does not know how to check external services. The
155 [Monitoring Plugins Project](https://www.monitoring-plugins.org/) provides
156 an extensive set of plugins which can be used with Icinga 2 to check whether
157 services are working properly.
159 The recommended way of installing these standard plugins is to use your
160 distribution's package manager.
164 > The `Nagios Plugins` project was renamed to `Monitoring Plugins`
165 > in January 2014. At the time of this writing some packages are still
166 > using the old name while some distributions have adopted the new package
167 > name `monitoring-plugins` already.
171 > EPEL for RHEL/CentOS 7 is still in beta mode at the time of writing and does
172 > not provide a `monitoring-plugins` package. You are required to manually install
175 For your convenience here is a list of package names for some of the more
176 popular operating systems/distributions:
178 OS/Distribution | Package Name | Installation Path
179 -----------------------|--------------------|---------------------------
180 RHEL/CentOS (EPEL) | nagios-plugins-all | /usr/lib/nagios/plugins or /usr/lib64/nagios/plugins
181 Debian | nagios-plugins | /usr/lib/nagios/plugins
182 FreeBSD | nagios-plugins | /usr/local/libexec/nagios
183 OS X (MacPorts) | nagios-plugins | /opt/local/libexec
185 Depending on which directory your plugins are installed into you may need to
186 update the global `PluginDir` constant in your Icinga 2 configuration. This macro is used
187 by the service templates contained in the Icinga Template Library to determine
188 where to find the plugin binaries.
190 ### <a id="integrate-additional-plugins"></a> Integrate Additional Plugins
192 For some services you may need additional 'check plugins' which are not provided
193 by the official Monitoring Plugins project.
195 All existing Nagios or Icinga 1.x plugins work with Icinga 2. Here's a
196 list of popular community sites which host check plugins:
198 * [MonitoringExchange](https://www.monitoringexchange.org)
199 * [Icinga Wiki](https://wiki.icinga.org)
201 The recommended way of setting up these plugins is to copy them to a common directory
202 and create an extra global constant, e.g. `CustomPluginDir` in your [constants.conf](#constants-conf)
205 # cp check_snmp_int.pl /opt/plugins
206 # chmod +x /opt/plugins/check_snmp_int.pl
208 # cat /etc/icinga2/constants.conf
210 * This file defines global constants which can be used in
211 * the other configuration files. At a minimum the
212 * PluginDir constant should be defined.
215 const PluginDir = "/usr/lib/nagios/plugins"
216 const CustomPluginDir = "/opt/monitoring"
218 Prior to using the check plugin with Icinga 2 you should ensure that it is working properly
219 by trying to run it on the console using whichever user Icinga 2 is running as:
221 # su - icinga -s /bin/bash
222 $ /opt/plugins/check_snmp_int.pl --help
224 Additional libraries may be required for some plugins. Please consult the plugin
225 documentation and/or plugin provided README for installation instructions.
227 Each plugin requires a [CheckCommand](#objecttype-checkcommand) object in your
228 configuration which can be used in the [Service](#objecttype-service) or
229 [Host](#objecttype-host) object definition. Examples for `CheckCommand`
230 objects can be found in the [Plugin Check Commands](#plugin-check-commands) shipped
232 For further information on your monitoring configuration read the
233 [monitoring basics](#monitoring-basics).
236 ## <a id="configuring-icinga2-first-steps"></a> Configuring Icinga 2: First Steps
238 ### <a id="icinga2-conf"></a> icinga2.conf
240 An example configuration file is installed for you in `/etc/icinga2/icinga2.conf`.
242 Here's a brief description of the example configuration:
245 * Icinga 2 configuration file
246 * - this is where you define settings for the Icinga application including
247 * which hosts/services to check.
249 * For an overview of all available configuration options please refer
250 * to the documentation that is distributed as part of Icinga 2.
253 Icinga 2 supports [C/C++-style comments](#comments).
256 * The constants.conf defines global constants.
258 include "constants.conf"
260 The `include` directive can be used to include other files.
263 * The zones.conf defines zones for a cluster setup.
264 * Not required for single instance setups.
269 * The Icinga Template Library (ITL) provides a number of useful templates
270 * and command definitions.
271 * Common monitoring plugin command definitions are included separately.
277 * The features-available directory contains a number of configuration
278 * files for features which can be enabled and disabled using the
279 * icinga2-enable-feature / icinga2-disable-feature tools. These two tools work by creating
280 * and removing symbolic links in the features-enabled directory.
282 include "features-enabled/*.conf"
284 This `include` directive takes care of including the configuration files for all
285 the features which have been enabled with `icinga2-enable-feature`. See
286 [Enabling/Disabling Features](#features) for more details.
289 * Although in theory you could define all your objects in this file
290 * the preferred way is to create separate directories and files in the conf.d
291 * directory. Each of these files must have the file extension ".conf".
293 include_recursive "conf.d"
295 You can put your own configuration files in the `conf.d` directory. This
296 directive makes sure that all of your own configuration files are included.
298 ### <a id="constants-conf"></a> constants.conf
300 The `constants.conf` configuration file can be used to define global constants:
303 * This file defines global constants which can be used in
304 * the other configuration files.
307 /* The directory which contains the plugins from the Monitoring Plugins project. */
308 const PluginDir = "/usr/lib/nagios/plugins"
310 /* Our local instance name. This should be the common name from the API certificate */
311 const NodeName = "localhost"
313 /* Our local zone name. */
314 const ZoneName = NodeName
316 ### <a id="zones-conf"></a> zones.conf
318 The `zones.conf` configuration file can be used to configure `Endpoint` and `Zone` objects
319 required for a [distributed zone setup](#distributed-monitoring-high-availability). By default
320 a local dummy zone is defined based on the `NodeName` constant defined in
321 [constants.conf](#constants-conf).
325 > Not required for single instance installations.
328 ### <a id="localhost-conf"></a> localhost.conf
330 The `conf.d/hosts/localhost.conf` file contains our first host definition:
333 * A host definition. You can create your own configuration files
334 * in the conf.d directory (e.g. one per host). By default all *.conf
335 * files in this directory are included.
338 object Host "localhost" {
339 import "generic-host"
341 address = "127.0.0.1"
348 This defines the host `localhost`. The `import` keyword is used to import
349 the `generic-host` template which takes care of setting up the host check
350 command to `hostalive`. If you require a different check command, you can
351 override it in the object definition.
353 The `vars` attribute can be used to define custom attributes which are available
354 for check and notification commands. Most of the templates in the Icinga
355 Template Library require an `address` attribute.
357 The custom attribute `os` is evaluated by the `linux-servers` group in
358 `groups.conf `making the host `localhost` a member.
360 object HostGroup "linux-servers" {
361 display_name = "Linux Servers"
363 assign where host.vars.os == "Linux"
366 A host notification apply rule in `notifications.conf` checks for the custom
367 attribute `sla` being set to `24x7` automatically applying a host notification.
370 * The example notification apply rules.
372 * Only applied if host/service objects have
373 * the custom attribute `sla` set to `24x7`.
376 apply Notification "mail-icingaadmin" to Host {
377 import "mail-host-notification"
379 user_groups = [ "icingaadmins" ]
381 assign where host.vars.sla == "24x7"
384 Now it's time to define services for the host object. Because these checks
385 are only available for the `localhost` host, they are organized below
390 > The directory tree and file organisation is just an example. You are
391 > free to define your own strategy. Just keep in mind to include the
392 > main directories in the [icinga2.conf](#icinga2-conf) file.
394 object Service "disk" {
395 import "generic-service"
397 host_name = "localhost"
398 check_command = "disk"
402 object Service "http" {
403 import "generic-service"
405 host_name = "localhost"
406 check_command = "http"
410 object Service "load" {
411 import "generic-service"
413 host_name = "localhost"
414 check_command = "load"
418 object Service "procs" {
419 import "generic-service"
421 host_name = "localhost"
422 check_command = "procs"
426 object Service "ssh" {
427 import "generic-service"
429 host_name = "localhost"
430 check_command = "ssh"
434 object Service "swap" {
435 import "generic-service"
437 host_name = "localhost"
438 check_command = "swap"
442 object Service "users" {
443 import "generic-service"
445 host_name = "localhost"
446 check_command = "users"
450 object Service "icinga" {
451 import "generic-service"
453 host_name = "localhost"
454 check_command = "icinga"
458 The command object `icinga` for the embedded health check is provided by the
459 [Icinga Template Library (ITL)](#itl) while `http_ip`, `ssh`, `load`, `processes`,
460 `users` and `disk` are all provided by the plugin check commands which we enabled
461 earlier by including the `itl` and `plugins` configuration file.
463 The Debian packages also ship an additional `apt` service check.
467 > Instead of defining each service object and assigning it to a host object
468 > using the `host_name` attribute rather use the [apply rules](#apply)
469 > simplifying your configuration.
471 There are two generic services applied to all hosts in the host group `linux-servers`
472 and `windows-servers` by default: `ping4` and `ping6`. Host objects without
473 a valid `address` resp. `address6` attribute will be excluded.
475 apply Service "ping4" {
476 import "generic-service"
478 check_command = "ping4"
481 assign where "linux-servers" in host.groups
482 assign where "windows-servers" in host.groups
483 ignore where host.address == ""
486 apply Service "ping6" {
487 import "generic-service"
489 check_command = "ping6"
492 assign where "linux-servers" in host.groups
493 assign where "windows-servers" in host.groups
494 ignore where host.address6 == ""
497 Each of these services has the custom attribute `sla` set to `24x7`. The
498 notification apply rule in `notifications.conf` will automatically apply
499 a service notification matchting this attribute pattern.
501 apply Notification "mail-icingaadmin" to Service {
502 import "mail-service-notification"
504 user_groups = [ "icingaadmins" ]
506 assign where service.vars.sla == "24x7"
509 Don't forget to install the [check plugins](#setting-up-check-plugins) required by the services and
510 their check commands.
512 Further details on the monitoring configuration can be found in the
513 [monitoring basics](#monitoring-basics) chapter.
515 ## <a id="configuring-db-ido"></a> Configuring DB IDO
517 The DB IDO (Database Icinga Data Output) modules for Icinga 2 take care of exporting
518 all configuration and status information into a database. The IDO database is used
519 by a number of projects including Icinga Web 1.x, Reporting or Icinga Web 2.
521 There is a separate module for each database back-end. At present support for
522 both MySQL and PostgreSQL is implemented.
524 Icinga 2 uses the Icinga 1.x IDOUtils database schema. Icinga 2 requires additional
525 features not yet released with older Icinga 1.x versions.
529 > Please check the [what's new](#whats-new) section for the required schema version.
533 > Only install the IDO feature if your web interface or reporting tool requires
534 > you to do so (for example, [Icinga Web](#setting-up-icinga-web) or [Icinga Web 2](#setting-up-icingaweb2)).
535 > [Icinga Classic UI](#setting-up-icinga-classic-ui) does not use IDO as backend.
537 ### <a id="installing-database"></a> Installing the Database Server
539 In order to use DB IDO you need to setup either [MySQL](#installing-database-mysql-server)
540 or [PostgreSQL](#installing-database-postgresql-server) as supported database server.
544 > It's up to you whether you choose to install it on the same server where Icinga 2 is running on,
545 > or on a dedicated database host (or cluster).
547 #### <a id="installing-database-mysql-server"></a> Installing MySQL database server
551 # apt-get install mysql-server mysql-client
555 # yum install mysql-server mysql
556 # chkconfig mysqld on
557 # service mysqld start
559 RHEL/CentOS 7 and Fedora 20 prefer MariaDB over MySQL:
561 # yum install mariadb-server mariadb
562 # systemctl enable mariadb.service
563 # systemctl start mariadb.service
567 # zypper install mysql mysql-client
568 # chkconfig mysqld on
569 # service mysqld start
571 RHEL based distributions do not automatically set a secure root password. Do that **now**:
573 # /usr/bin/mysql_secure_installation
576 #### <a id="installing-database-postgresql-server"></a> Installing PostgreSQL database server
580 # apt-get install postgresql
584 # yum install postgresql-server postgresql
585 # chkconfig postgresql on
586 # service postgresql start
588 RHEL/CentOS 7 and Fedora 20 use [systemd](#systemd-service):
590 # yum install postgresql-server postgresql
591 # systemctl enable postgresql.service
592 # systemctl start postgresql.service
596 # zypper install postgresql postgresql-server
597 # chkconfig postgresql on
598 # service postgresql start
600 ### <a id="configuring-db-ido-mysql"></a> Configuring DB IDO MySQL
602 First of all you have to install the `icinga2-ido-mysql` package using your
603 distribution's package manager.
607 # apt-get install icinga2-ido-mysql
611 # yum install icinga2-ido-mysql
615 # zypper install icinga2-ido-mysql
621 > Upstream Debian packages provide a database configuration wizard by default.
622 > You can skip the automated setup and install/upgrade the database manually
623 > if you prefer that.
625 #### <a id="setting-up-mysql-db"></a> Setting up the MySQL database
627 Set up a MySQL database for Icinga 2:
631 mysql> CREATE DATABASE icinga;
632 GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON icinga.* TO 'icinga'@'localhost' IDENTIFIED BY 'icinga';
635 After creating the database you can import the Icinga 2 IDO schema using the
638 # mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/mysql.sql
641 #### <a id="upgrading-mysql-db"></a> Upgrading the MySQL database
643 Check the `/usr/share/icinga2-ido-mysql/schema/upgrade` directory for an
644 incremental schema upgrade file.
648 > If there isn't an upgrade file for your current version available there's nothing to do.
650 Apply all database schema upgrade files incrementially.
652 # mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/upgrade/<version>.sql
654 The Icinga 2 DB IDO module will check for the required database schema version on startup
655 and generate an error message if not satisfied.
658 **Example:** You are upgrading Icinga 2 from version `2.0.2` to `2.1.0`. Look into
659 the *upgrade* directory:
661 $ ls /usr/share/icinga2-ido-mysql/schema/upgrade/
664 There is a new upgrade file called `2.1.0.sql` which must be applied to your IDO database.
667 #### <a id="installing-ido-mysql"></a> Installing the IDO MySQL module
669 The package provides a new configuration file that is installed in
670 `/etc/icinga2/features-available/ido-mysql.conf`. You will need to update the
671 database credentials in this file.
673 You can enable the `ido-mysql` feature configuration file using `icinga2-enable-feature`:
675 # icinga2-enable-feature ido-mysql
676 Module 'ido-mysql' was enabled.
677 Make sure to restart Icinga 2 for these changes to take effect.
679 After enabling the ido-mysql feature you have to restart Icinga 2:
681 Debian/Ubuntu, RHEL/CentOS 6 and SUSE:
683 # service icinga2 restart
685 RHEL/CentOS 7 and Fedora 20:
687 # systemctl restart icinga2.service
689 ### <a id="configuring-db-ido-postgresql"></a> Configuring DB IDO PostgreSQL
691 First of all you have to install the `icinga2-ido-pgsql` package using your
692 distribution's package manager.
696 # apt-get install icinga2-ido-pgsql
700 # yum install icinga2-ido-pgsql
704 # zypper install icinga2-ido-pgsql
708 > Upstream Debian packages provide a database configuration wizard by default.
709 > You can skip the automated setup and install/upgrade the database manually
710 > if you prefer that.
712 #### Setting up the PostgreSQL database
714 Set up a PostgreSQL database for Icinga 2:
717 # sudo -u postgres psql -c "CREATE ROLE icinga WITH LOGIN PASSWORD 'icinga'";
718 # sudo -u postgres createdb -O icinga -E UTF8 icinga
719 # sudo -u postgres createlang plpgsql icinga
723 > Using PostgreSQL 9.x you can omit the `createlang` command.
725 Locate your pg_hba.conf (Debian: `/etc/postgresql/*/main/pg_hba.conf`,
726 RHEL/SUSE: `/var/lib/pgsql/data/pg_hba.conf`), add the icinga user with md5
727 authentication method and restart the postgresql server.
729 # vim /var/lib/pgsql/data/pg_hba.conf
732 local icinga icinga md5
733 host icinga icinga 127.0.0.1/32 md5
734 host icinga icinga ::1/128 md5
736 # "local" is for Unix domain socket connections only
738 # IPv4 local connections:
739 host all all 127.0.0.1/32 ident
740 # IPv6 local connections:
741 host all all ::1/128 ident
743 # /etc/init.d/postgresql restart
746 After creating the database and permissions you can import the Icinga 2 IDO schema
747 using the following command:
749 # export PGPASSWORD=icinga
750 # psql -U icinga -d icinga < /usr/share/icinga2-ido-pgsql/schema/pgsql.sql
752 #### <a id="upgrading-postgresql-db"></a> Upgrading the PostgreSQL database
754 Check the `/usr/share/icinga2-ido-pgsql/schema/upgrade` directory for an
755 incremental schema upgrade file.
759 > If there isn't an upgrade file for your current version available there's nothing to do.
761 Apply all database schema upgrade files incrementially.
763 # export PGPASSWORD=icinga
764 # psql -U icinga -d icinga < /usr/share/icinga2-ido-pgsql/schema/upgrade/<version>.sql
766 The Icinga 2 DB IDO module will check for the required database schema version on startup
767 and generate an error message if not satisfied.
769 **Example:** You are upgrading Icinga 2 from version `2.0.2` to `2.1.0`. Look into
770 the *upgrade* directory:
772 $ ls /usr/share/icinga2-ido-pgsql/schema/upgrade/
775 There is a new upgrade file called `2.1.0.sql` which must be applied to your IDO database.
778 #### <a id="installing-ido-postgresql"></a> Installing the IDO PostgreSQL module
780 The package provides a new configuration file that is installed in
781 `/etc/icinga2/features-available/ido-pgsql.conf`. You will need to update the
782 database credentials in this file.
784 You can enable the `ido-pgsql` feature configuration file using `icinga2-enable-feature`:
786 # icinga2-enable-feature ido-pgsql
787 Module 'ido-pgsql' was enabled.
788 Make sure to restart Icinga 2 for these changes to take effect.
790 After enabling the ido-pgsql feature you have to restart Icinga 2:
792 Debian/Ubuntu, RHEL/CentOS 6 and SUSE:
794 # service icinga2 restart
796 RHEL/CentOS 7 and Fedora 20:
798 # systemctl restart icinga2.service
801 ### <a id="setting-up-external-command-pipe"></a> Setting Up External Command Pipe
803 Web interfaces and other Icinga addons are able to send commands to
804 Icinga 2 through the external command pipe.
806 You can enable the External Command Pipe using icinga2-enable-feature:
808 # icinga2-enable-feature command
810 After that you will have to restart Icinga 2:
812 Debian/Ubuntu, RHEL/CentOS 6 and SUSE:
814 # service icinga2 restart
816 RHEL/CentOS 7 and Fedora 20:
818 # systemctl restart icinga2.service
820 By default the command pipe file is owned by the group `icingacmd` with read/write
821 permissions. Add your webserver's user to the group `icingacmd` to
822 enable sending commands to Icinga 2 through your web interface:
824 # usermod -G -a icingacmd www-data
826 Debian packages use `nagios` as the default user and group name. Therefore change `icingacmd` to
827 `nagios`. The webserver's user is different between distributions as well.
829 Change "www-data" to the user you're using to run queries.
833 > Packages will do that automatically. Verify that by running `id <your-webserver-user>` and skip this
836 ## <a id="setting-up-livestatus"></a> Setting up Livestatus
838 The [MK Livestatus](http://mathias-kettner.de/checkmk_livestatus.html) project
839 implements a query protocol that lets users query their Icinga instance for
840 status information. It can also be used to send commands.
844 > Only install the Livestatus feature if your web interface or addon requires
845 > you to do so (for example, [Icinga Web 2](#setting-up-icingaweb2)).
846 > [Icinga Classic UI](#setting-up-icinga-classic-ui) and [Icinga Web](#setting-up-icinga-web)
847 > do not use Livestatus as backend.
849 The Livestatus component that is distributed as part of Icinga 2 is a
850 re-implementation of the Livestatus protocol which is compatible with MK
853 Details on the available tables and attributes with Icinga 2 can be found
854 in the [Livestatus Schema](#schema-livestatus) section.
856 You can enable Livestatus using icinga2-enable-feature:
858 # icinga2-enable-feature livestatus
860 After that you will have to restart Icinga 2:
862 Debian/Ubuntu, RHEL/CentOS 6 and SUSE:
864 # service icinga2 restart
866 RHEL/CentOS 7 and Fedora 20:
868 # systemctl restart icinga2.service
870 By default the Livestatus socket is available in `/var/run/icinga2/cmd/livestatus`.
872 In order for queries and commands to work you will need to add your query user
873 (e.g. your web server) to the `icingacmd` group:
875 # usermod -a -G icingacmd www-data
877 The Debian packages use `nagios` as the user and group name. Make sure to change `icingacmd` to
878 `nagios` if you're using Debian.
880 Change "www-data" to the user you're using to run queries.
882 In order to use the historical tables provided by the livestatus feature (for example, the
883 `log` table) you need to have the `CompatLogger` feature enabled. By default these logs
884 are expected to be in `/var/log/icinga2/compat`. A different path can be set using the
885 `compat_log_path` configuration attribute.
887 # icinga2-enable-feature compatlog
889 ## <a id="setting-up-icinga2-user-interfaces"></a> Setting up Icinga 2 User Interfaces
891 Icinga 2 is compatible with Icinga 1.x user interfaces by providing additional
892 features required as backends.
894 Furthermore these interfaces can be used for the newly created `Icinga Web 2`
897 Some interface features will only work in a limited manner due to
898 [compatibility reasons](#differences-1x-2), other features like the
899 statusmap parents are available by dumping the host dependencies as parents.
900 Special restrictions are noted specifically in the sections below.
904 > Choose your preferred interface. There's no need to install [Classic UI](#setting-up-icinga-classic-ui)
905 > if you prefer [Icinga Web](#setting-up-icinga-web) or [Icinga Web 2](#setting-up-icingaweb2) for example.
907 ### <a id="icinga2-user-interface-requirements"></a> Requirements
909 * Web server (Apache2/Httpd, Nginx, Lighttp, etc)
911 * Firewall ports (tcp/80)
913 The Debian, RHEL and SUSE packages for Icinga [Classic UI](#setting-up-icinga-classic-ui),
914 [Web](#setting-up-icinga-web) and [Icingaweb 2](#setting-up-icingaweb2) depend on Apache2
917 #### <a id="icinga2-user-interface-webserver"></a> Webserver
919 Debian/Ubuntu packages will automatically fetch and install the required packages.
924 # chkconfig httpd on && service httpd start
926 # systemctl enable httpd && systemctl start httpd
930 # zypper install apache2
931 # chkconfig on && service apache2 start
933 #### <a id="icinga2-user-interface-firewall-rules"></a> Firewall Rules
937 # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
938 # service iptables save
940 RHEL/CentOS 7 specific:
942 # firewall-cmd --add-service=http
943 # firewall-cmd --permanent --add-service=http
945 ### <a id="setting-up-icinga-classic-ui"></a> Setting up Icinga Classic UI
947 Icinga 2 can write `status.dat` and `objects.cache` files in the format that
948 is supported by the Icinga 1.x Classic UI. [External commands](#external-commands)
949 (a.k.a. the "command pipe") are also supported. It also supports writing Icinga 1.x
950 log files which are required for the reporting functionality in the Classic UI.
952 #### <a id="installing-icinga-classic-ui"></a> Installing Icinga Classic UI
954 The Icinga package repository has both Debian and RPM packages. You can install
955 the Classic UI using the following packages:
957 Distribution | Packages
958 --------------|---------------------
959 Debian | icinga2-classicui
960 RHEL/SUSE | icinga2-classicui-config icinga-gui
962 The Debian packages require additional packages which are provided by the
963 [Debian Monitoring Project](http://www.debmon.org) (`DebMon`) repository.
965 `libjs-jquery-ui` requires at least version `1.10.*` which is not available
966 in Debian Wheezy and Ubuntu 12.04 LTS (Precise). Add the following repositories
967 to satisfy this dependency:
969 Distribution | Package Repositories
970 ------------------------------|------------------------------
971 Debian Wheezy | [wheezy-backports](http://backports.debian.org/Instructions/) or [DebMon](http://www.debmon.org)
972 Ubuntu 12.04 LTS (Precise) | [Icinga PPA](https://launchpad.net/~formorer/+archive/icinga)
974 On all distributions other than Debian you may have to restart both your web
975 server as well as Icinga 2 after installing the Classic UI package.
977 Icinga Classic UI requires the [StatusDataWriter](#status-data), [CompatLogger](#compat-logging)
978 and [ExternalCommandListener](#external-commands) features.
979 Enable these features and restart Icinga 2.
981 # icinga2-enable-feature statusdata compatlog command
983 In order for commands to work you will need to [setup the external command pipe](#setting-up-external-command-pipe).
985 #### <a id="setting-up-icinga-classic-ui-summary"></a> Setting Up Icinga Classic UI Summary
987 Verify that your Icinga 1.x Classic UI works by browsing to your Classic
990 Distribution | URL | Default Login
991 --------------|--------------------------------------------------------------------------|--------------------------
992 Debian | [http://localhost/icinga2-classicui](http://localhost/icinga2-classicui) | asked during installation
993 all others | [http://localhost/icinga](http://localhost/icinga) | icingaadmin/icingaadmin
995 For further information on configuration, troubleshooting and interface documentation
996 please check the official [Icinga 1.x user interface documentation](http://docs.icinga.org/latest/en/ch06.html).
998 ### <a id="setting-up-icinga-web"></a> Setting up Icinga Web
1000 Icinga 2 can write to the same schema supplied by `Icinga IDOUtils 1.x` which
1001 is an explicit requirement to run `Icinga Web` next to the external command pipe.
1002 Therefore you need to setup the [DB IDO feature](#configuring-ido) remarked in the previous sections.
1004 #### <a id="installing-icinga-web"></a> Installing Icinga Web
1006 The Icinga package repository has both Debian and RPM packages. You can install
1007 Icinga Web using the following packages (RPMs ship an additional configuration package):
1009 Distribution | Packages
1010 --------------|-------------------------------------------------------
1011 RHEL/SUSE | icinga-web icinga-web-{mysql,pgsql}
1012 Debian | icinga-web icinga-web-config-icinga2-ido-{mysql,pgsql}
1014 #### <a id="icinga-web-rpm-notes"></a> Icinga Web on RPM based systems
1016 Additionally you need to setup the `icinga_web` database and import the database schema.
1017 Details can be found in the package `README` files, for example [README.RHEL](https://github.com/Icinga/icinga-web/blob/master/doc/README.RHEL)
1019 The Icinga Web RPM packages install the schema files into
1020 `/usr/share/doc/icinga-web-*/schema` (`*` means package version).
1021 The Icinga Web dist tarball ships the schema files in `etc/schema`.
1023 On SuSE-based distributions the schema files are installed in
1024 `/usr/share/doc/packages/icinga-web/schema`.
1026 Example for RHEL and MySQL:
1030 mysql> CREATE DATABASE icinga_web;
1031 GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON icinga_web.* TO 'icinga_web'@'localhost' IDENTIFIED BY 'icinga_web';
1034 # mysql -u root -p icinga_web < /usr/share/doc/icinga-web-<version>/schema/mysql.sql
1036 Icinga Web requires the IDO feature as database backend using MySQL or PostgreSQL.
1037 Enable that feature, e.g. for MySQL.
1039 # icinga2-enable-feature ido-mysql
1041 If you've changed your default credentials you may either create a read-only user
1042 or use the credentials defined in the IDO feature for Icinga Web backend configuration.
1043 Edit `databases.xml` accordingly and clear the cache afterwards. Further details can be
1044 found in the [Icinga Web documentation](http://docs.icinga.org/latest/en/icinga-web-config.html).
1046 # vim /etc/icinga-web/conf.d/databases.xml
1048 # icinga-web-clearcache
1050 Additionally you need to enable the `command` feature for sending [external commands](#external-commands):
1052 # icinga2-enable-feature command
1054 In order for commands to work you will need to [setup the external command pipe](#setting-up-external-command-pipe).
1056 Then edit the Icinga Web configuration for sending commands in `/etc/icinga-web/conf.d/access.xml`
1057 (RHEL) or `/etc/icinga-web/access.xml` (SUSE) setting the command pipe path
1058 to the default used in Icinga 2. Make sure to clear the cache afterwards.
1060 # vim /etc/icinga-web/conf.d/access.xml
1064 <resource name="icinga_pipe">/var/run/icinga2/cmd/icinga2.cmd</resource>
1068 # icinga-web-clearcache
1072 > The path to the Icinga Web `clearcache` script may differ. Please check the
1073 > [Icinga Web documentation](https://docs.icinga.org) for details.
1075 #### <a id="icinga-web-debian-notes"></a> Icinga Web on Debian systems
1077 Since Icinga Web 1.11.1-2 on Debian and Ubuntu, the IDO autoconfiguration has been moved to additional packages.
1079 The package `icinga-web` no longer configures the IDO connection, you can use one of the config packages:
1081 - `icinga-web-config-icinga2-ido-mysql`
1082 - `icinga-web-config-icinga2-ido-pgsql`
1084 These packages take care of setup up the IDO connection, enabling the command pipe from Icinga Web
1085 and depend on the corresponding packages of Icinga 2.
1087 Please read the README.Debian files for details and how to do advanced configuration:
1089 - `/usr/share/doc/icinga-web/README.Debian`
1090 - `/usr/share/doc/icinga-web-config-icinga2-ido-mysql/README.Debian`
1091 - `/usr/share/doc/icinga-web-config-icinga2-ido-pgsql/README.Debian`
1093 If you change the XML configuration of Icinga Web, make sure to clear the config cache:
1095 # /usr/lib/icinga-web/bin/clearcache.sh
1099 > When you use an older version of icinga-web you should install it with:
1100 > `apt-get install --no-install-recommends icinga-web`
1102 #### <a id="setting-up-icinga-web-summary"></a> Setting Up Icinga Web Summary
1104 Verify that your Icinga 1.x Web works by browsing to your Web installation URL:
1106 Distribution | URL | Default Login
1107 --------------|-------------------------------------------------------------|--------------------------
1108 Debian | [http://localhost/icinga-web](http://localhost/icinga-web) | asked during installation
1109 all others | [http://localhost/icinga-web](http://localhost/icinga-web) | root/password
1111 For further information on configuration, troubleshooting and interface documentation
1112 please check the official [Icinga 1.x user interface documentation](http://docs.icinga.org/latest/en/ch06.html).
1115 ### <a id="setting-up-icingaweb2"></a> Setting up Icinga Web 2
1117 Icinga Web 2 will support `status.dat`, `DB IDO`, or `Livestatus` as backends.
1119 Using DB IDO as backend, you need to install and configure the [DB IDO backend](#configuring-db-ido).
1120 Once finished, you can enable the feature for DB IDO MySQL:
1122 # icinga2-enable-feature ido-mysql
1124 Furthermore [external commands](#external-commands) are supported through the external
1127 # icinga2-enable-feature command
1129 In order for commands to work you will need to [setup the external command pipe](#setting-up-external-command-pipe).
1131 Please consult the INSTALL documentation shipped with `Icinga Web 2` for
1132 further instructions on how to install Icinga Web 2 and to configure
1133 backends, resources and instances.
1137 > Icinga Web 2 is still under heavy development. Rather than installing it
1138 > yourself you should consider testing it using the available Vagrant
1139 > demo VM in the [git repository](https://github.com/icinga/icingaweb2).
1141 Check the [Icinga website](https://www.icinga.org) for release schedules,
1142 blog updates and more.
1145 ### <a id="additional-visualization"></a> Additional visualization
1147 There are many visualization addons which can be used with Icinga 2.
1149 Some of the more popular ones are [PNP](#addons-graphing-pnp), [inGraph](#addons-graphing-pnp)
1150 graphing performance data), [Graphite](#addons-graphing-pnp), and
1151 [NagVis](#addons-visualization-nagvis) (network maps).
1154 ## <a id="configuration-tools"></a> Configuration Tools
1156 If you require your favourite configuration tool to export Icinga 2 configuration, please get in
1157 touch with their developers. The Icinga project does not provide a configuration web interface
1162 > Get to know the new configuration format and the advanced [apply](#using-apply) rules and
1163 > use [syntax highlighting](#configuration-syntax-highlighting) in vim/nano.
1165 If you're looking for puppet manifests, chef cookbooks, ansible recipes, etc - we're happy
1166 to integrate them upstream, so please get in touch at [https://support.icinga.org](https://support.icinga.org).
1168 These tools are in development and require feedback and tests:
1170 * [Ansible Roles](https://github.com/Icinga/icinga2-ansible)
1171 * [Puppet Module](https://github.com/Icinga/puppet-icinga2)
1173 ## <a id="configuration-syntax-highlighting"></a> Configuration Syntax Highlighting
1175 Icinga 2 ships configuration examples for syntax highlighting using the `vim` and `nano`editors.
1176 The RHEL, SUSE and Debian package `icinga2-common` install these files into
1177 `/usr/share/*/icinga2-common/syntax`. Sources provide these files in `tools/syntax`.
1179 ### <a id="configuration-syntax-highlighting-vim"></a> Configuration Syntax Highlighting using Vim
1181 Create a new local vim configuration storage, if not already existing.
1182 Edit `vim/ftdetect/icinga2.vim` if your paths to the Icinga 2 configuration
1186 $ mkdir -p $PREFIX/{syntax,ftdetect}
1187 $ cp vim/syntax/icinga2.vim $PREFIX/syntax/
1188 $ cp vim/ftdetect/icinga2.vim $PREFIX/ftdetect/
1192 $ vim /etc/icinga2/conf.d/templates.conf
1194 ### <a id="configuration-syntax-highlighting-nano"></a> Configuration Syntax Highlighting using Nano
1196 Copy the `/etc/nanorc` sample file to your home directory. Create the `/etc/nano` directory
1197 and copy the provided `icinga2.nanorc` into it.
1199 $ cp /etc/nanorc ~/.nanorc
1201 # mkdir -p /etc/nano
1202 # cp icinga2.nanorc /etc/nano/
1204 Then include the icinga2.nanorc file in your ~/.nanorc by adding the following line:
1209 include "/etc/nano/icinga2.nanorc"
1213 $ nano /etc/icinga2/conf.d/templates.conf
1216 ## <a id="running-icinga2"></a> Running Icinga 2
1218 ### <a id="init-script"></a> Init Script
1220 Icinga 2's init script is installed in `/etc/init.d/icinga2` by default:
1222 # /etc/init.d/icinga2
1223 Usage: /etc/init.d/icinga2 {start|stop|restart|reload|checkconfig|status}
1225 Command | Description
1226 --------------------|------------------------
1227 start | The `start` action starts the Icinga 2 daemon.
1228 stop | The `stop` action stops the Icinga 2 daemon.
1229 restart | The `restart` action is a shortcut for running the `stop` action followed by `start`.
1230 reload | The `reload` action sends the `HUP` signal to Icinga 2 which causes it to restart. Unlike the `restart` action `reload` does not wait until Icinga 2 has restarted.
1231 checkconfig | The `checkconfig` action checks if the `/etc/icinga2/icinga2.conf` configuration file contains any errors.
1232 status | The `status` action checks if Icinga 2 is running.
1234 By default the Icinga 2 daemon is running as `icinga` user and group
1235 using the init script. Using Debian packages the user and group are set to `nagios`
1236 for historical reasons.
1238 ### <a id="systemd-service"></a> Systemd Service
1240 Modern distributions (Fedora, OpenSUSE, etc.) already use `Systemd` natively. Enterprise-grade
1241 distributions such as RHEL7 changed to `Systemd` recently. Icinga 2 Packages will install the
1242 service automatically.
1244 The Icinga 2 `Systemd` service can be (re)started, reloaded, stopped and also queried for its current status.
1246 # systemctl status icinga2
1247 icinga2.service - Icinga host/service/network monitoring system
1248 Loaded: loaded (/usr/lib/systemd/system/icinga2.service; disabled)
1249 Active: active (running) since Mi 2014-07-23 13:39:38 CEST; 15s ago
1250 Process: 21692 ExecStart=/usr/sbin/icinga2 -c ${ICINGA2_CONFIG_FILE} -d -e ${ICINGA2_ERROR_LOG} -u ${ICINGA2_USER} -g ${ICINGA2_GROUP} (code=exited, status=0/SUCCESS)
1251 Process: 21674 ExecStartPre=/usr/sbin/icinga2-prepare-dirs /etc/sysconfig/icinga2 (code=exited, status=0/SUCCESS)
1252 Main PID: 21727 (icinga2)
1253 CGroup: /system.slice/icinga2.service
1254 └─21727 /usr/sbin/icinga2 -c /etc/icinga2/icinga2.conf -d -e /var/log/icinga2/error.log -u icinga -g icinga --no-stack-rlimit
1256 Jul 23 13:39:38 nbmif icinga2[21692]: [2014-07-23 13:39:38 +0200] information/ConfigItem: Checked 309 Service(s).
1257 Jul 23 13:39:38 nbmif icinga2[21692]: [2014-07-23 13:39:38 +0200] information/ConfigItem: Checked 1 User(s).
1258 Jul 23 13:39:38 nbmif icinga2[21692]: [2014-07-23 13:39:38 +0200] information/ConfigItem: Checked 15 Notification(s).
1259 Jul 23 13:39:38 nbmif icinga2[21692]: [2014-07-23 13:39:38 +0200] information/ConfigItem: Checked 4 ScheduledDowntime(s).
1260 Jul 23 13:39:38 nbmif icinga2[21692]: [2014-07-23 13:39:38 +0200] information/ConfigItem: Checked 1 UserGroup(s).
1261 Jul 23 13:39:38 nbmif icinga2[21692]: [2014-07-23 13:39:38 +0200] information/ConfigItem: Checked 1 IcingaApplication(s).
1262 Jul 23 13:39:38 nbmif icinga2[21692]: [2014-07-23 13:39:38 +0200] information/ConfigItem: Checked 8 Dependency(s).
1263 Jul 23 13:39:38 nbmif systemd[1]: Started Icinga host/service/network monitoring system.
1265 `Systemd` supports the following command actions:
1267 Command | Description
1268 --------------------|------------------------
1269 start | The `start` action starts the Icinga 2 daemon.
1270 stop | The `stop` action stops the Icinga 2 daemon.
1271 restart | The `restart` action is a shortcut for running the `stop` action followed by `start`.
1272 reload | The `reload` action sends the `HUP` signal to Icinga 2 which causes it to restart. Unlike the `restart` action `reload` does not wait until Icinga 2 has restarted.
1273 status | The `status` action checks if Icinga 2 is running.
1274 enable | The `enable` action enables the service being started at system boot time (similar to `chkconfig`)
1276 If you're stuck with configuration errors, you can manually invoke the [configuration validation](#config-validation).
1278 # systemctl enable icinga2
1280 # systemctl restart icinga2
1281 Job for icinga2.service failed. See 'systemctl status icinga2.service' and 'journalctl -xn' for details.
1283 ### <a id="cmdline"></a> Command-line Options
1286 icinga2 - The Icinga 2 network monitoring daemon.
1289 --help show this help message
1290 -V [ --version ] show version information
1291 -l [ --library ] arg load a library
1292 -I [ --include ] arg add include search directory
1293 -D [ --define] args define a constant
1294 -c [ --config ] arg parse a configuration file
1295 -C [ --validate ] exit after validating the configuration
1296 -x [ --debug ] arg enable debugging with severity level specified
1297 -d [ --daemonize ] detach from the controlling terminal
1298 -e [ --errorlog ] arg log fatal errors to the specified log file (only works
1299 in combination with --daemonize)
1300 -u [ --user ] arg user to run Icinga as
1301 -g [ --group ] arg group to run Icinga as
1303 Report bugs at <https://dev.icinga.org/>
1304 Icinga home page: <http://www.icinga.org/>
1308 Instead of loading libraries using the [`library` config directive](#library)
1309 you can also use the `--library` command-line option.
1313 [Global constants](#global-constants) can be set using the `--define` command-line option.
1315 #### Config Include Path
1317 When including files you can specify that the include search path should be
1318 checked. You can do this by putting your configuration file name in angle
1323 This would cause Icinga 2 to search its include path for the configuration file
1324 `test.conf`. By default the installation path for the Icinga Template Library
1325 is the only search directory.
1327 Using the `--include` command-line option additional search directories can be
1332 Using the `--config` option you can specify one or more configuration files.
1333 Config files are processed in the order they're specified on the command-line.
1335 When no configuration file is specified and the `--no-config` is not used
1336 Icinga 2 automatically falls back to using the configuration file
1337 `SysconfDir + "/icinga2/icinga2.conf"` (where SysconfDir is usually `/etc`).
1339 #### Config Validation
1341 The `--validate` option can be used to check if your configuration files
1342 contain errors. If any errors are found the exit status is 1, otherwise 0
1345 ### <a id="features"></a> Enabling/Disabling Features
1347 Icinga 2 provides configuration files for some commonly used features. These
1348 are installed in the `/etc/icinga2/features-available` directory and can be
1349 enabled and disabled using the `icinga2-enable-feature` and `icinga2-disable-feature` tools,
1352 The `icinga2-enable-feature` tool creates symlinks in the `/etc/icinga2/features-enabled`
1353 directory which is included by default in the example configuration file.
1355 You can view a list of available feature configuration files:
1357 # icinga2-enable-feature
1358 Syntax: icinga2-enable-feature <feature>
1359 Enables the specified feature.
1361 Available features: statusdata
1363 Using the `icinga2-enable-feature` command you can enable features:
1365 # icinga2-enable-feature statusdata
1366 Module 'statusdata' was enabled.
1367 Make sure to restart Icinga 2 for these changes to take effect.
1369 You can disable features using the `icinga2-disable-feature` command:
1371 # icinga2-disable-feature statusdata
1372 Module 'statusdata' was disabled.
1373 Make sure to restart Icinga 2 for these changes to take effect.
1375 The `icinga2-enable-feature` and `icinga2-disable-feature` commands do not
1376 restart Icinga 2. You will need to restart Icinga 2 using the init script
1377 after enabling or disabling features.
1379 ### <a id="config-validation"></a> Configuration Validation
1381 Once you've edited the configuration files make sure to tell Icinga 2 to validate
1382 the configuration changes. Icinga 2 will log any configuration error including
1383 a hint on the file, the line number and the affected configuration line itself.
1385 The following example creates an apply rule without any `assign` condition.
1387 apply Service "5872-ping4" {
1388 import "test-generic-service"
1389 check_command = "ping4"
1390 //assign where match("5872-*", host.name)
1393 Validate the configuration with the init script option `checkconfig`
1395 # /etc/init.d/icinga2 checkconfig
1397 or manually passing the `-C` argument:
1399 # /usr/sbin/icinga2 -c /etc/icinga2/icinga2.conf -C
1401 [2014-05-22 17:07:25 +0200] critical/ConfigItem: Location:
1402 /etc/icinga2/conf.d/tests/5872.conf(5): }
1403 /etc/icinga2/conf.d/tests/5872.conf(6):
1404 /etc/icinga2/conf.d/tests/5872.conf(7): apply Service "5872-ping4" {
1406 /etc/icinga2/conf.d/tests/5872.conf(8): import "test-generic-service"
1407 /etc/icinga2/conf.d/tests/5872.conf(9): check_command = "ping4"
1409 Config error: 'apply' is missing 'assign'
1410 [2014-05-22 17:07:25 +0200] critical/ConfigItem: 1 errors, 0 warnings.
1411 Icinga 2 detected configuration errors.
1414 ### <a id="config-change-reload"></a> Reload on Configuration Changes
1416 Everytime you have changed your configuration you should first tell Icinga 2
1417 to [validate](#config-validation). If there are no validation errors you can
1418 safely reload the Icinga 2 daemon.
1420 # /etc/init.d/icinga2 reload
1424 > The `reload` action will send the `SIGHUP` signal to the Icinga 2 daemon
1425 > which will validate the configuration in a separate process and not stop
1426 > the other events like check execution, notifications, etc.
1428 > Details can be found [here](#differences-1x-2-real-reload).
1431 ## <a id="vagrant"></a> Vagrant Demo VM
1433 The Icinga Vagrant Git repository contains support for [Vagrant](http://docs.vagrantup.com/v2/)
1434 with VirtualBox. Please note that Vagrant version `1.0.x` is not supported. At least
1435 version `1.2.x` is required.
1437 In order to build the Vagrant VM first you will have to check out
1440 $ git clone git://git.icinga.org/icinga-vagrant.git
1442 For Icinga 2 there are currently two scenarios available:
1444 * `icinga2x` bringing up a standalone box with Icinga 2
1445 * `icinga2x-cluster` setting up two virtual machines in a master/slave cluster
1449 > Please consult the `README.md` file for each project for further installation
1450 > details at [https://github.com/Icinga/icinga-vagrant]
1452 Once you have checked out the Git repository navigate to your required
1453 vagrant box and build the VM using the following command:
1457 The Vagrant VMs are based on CentOS 6.x and are using the official
1458 Icinga 2 RPM snapshot packages from `packages.icinga.org`. The check
1459 plugins are installed from EPEL providing RPMs with sources from the
1460 Monitoring Plugins project.