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 ## <a id="setting-up-icinga2"></a> Setting up Icinga 2
9 First of all you will have to install Icinga 2. The preferred way of doing this
10 is to use the official Debian or RPM package repositories depending on which
11 operating system and distribution you are running.
13 Distribution | Repository URL
14 ------------------------|---------------------------
15 Debian | http://packages.icinga.org/debian/
16 Ubuntu | http://packages.icinga.org/ubuntu/
17 RHEL/CentOS | http://packages.icinga.org/epel/
18 OpenSUSE | http://packages.icinga.org/openSUSE/
19 SLES | http://packages.icinga.org/SUSE/
21 Packages for distributions other than the ones listed above may also be
22 available. Please check http://packages.icinga.org/ to see if packages
23 are available for your favourite distribution.
25 The packages for RHEL/CentOS 5 depend on other packages which are distributed
26 as part of the [EPEL repository](http://fedoraproject.org/wiki/EPEL). Please
27 make sure to enable this repository.
29 You can install Icinga 2 by using your distribution's package manager
30 to install the `icinga2` package.
32 On RHEL/CentOS and SLES you will need to use `chkconfig` to enable the
33 `icinga2` service. You can manually start Icinga 2 using `/etc/init.d/icinga2 start`.
35 Some parts of Icinga 2's functionality are available as separate packages:
38 ------------------------|--------------------------------
39 icinga2-ido-mysql | IDO provider module for MySQL
40 icinga2-ido-pgsql | IDO provider module for PostgreSQL
42 In case you're running a distribution for which Icinga 2 packages are
43 not yet available you will have to use the release tarball which you
44 can download from the [Icinga website](https://www.icinga.org/). The
45 release tarballs contain an `INSTALL` file with further instructions.
48 ### <a id="installation-paths"></a> Installation Paths
50 By default Icinga 2 uses the following files and directories:
53 ------------------------------------|------------------------------------
54 /etc/icinga2 | Contains Icinga 2 configuration files.
55 /etc/init.d/icinga2 | The Icinga 2 init script.
56 /usr/bin/icinga2-* | Migration and certificate build scripts.
57 /usr/sbin/icinga2* | The Icinga 2 binary and feature enable/disable scripts.
58 /usr/share/doc/icinga2 | Documentation files that come with Icinga 2.
59 /usr/share/icinga2/include | The Icinga Template Library and plugin command configuration.
60 /var/run/icinga2 | PID file.
61 /var/run/icinga2/cmd | Command pipe and Livestatus socket.
62 /var/cache/icinga2 | status.dat/objects.cache.
63 /var/spool/icinga2 | Used for performance data spool files.
64 /var/lib/icinga2 | Icinga 2 state file, cluster feature replay log and configuration files.
65 /var/log/icinga2 | Log file location and compat/ directory for the CompatLogger feature.
67 ### <a id="icinga2-conf"></a> icinga2.conf
69 An example configuration file is installed for you in `/etc/icinga2/icinga2.conf`.
71 Here's a brief description of the example configuration:
74 * Icinga 2 configuration file
75 * - this is where you define settings for the Icinga application including
76 * which hosts/services to check.
78 * For an overview of all available configuration options please refer
79 * to the documentation that is distributed as part of Icinga 2.
82 Icinga 2 supports [C/C++-style comments](#comments).
85 * The constants.conf defines global constants.
87 include "constants.conf"
89 The `include` directive can be used to include other files.
92 * The Icinga Template Library (ITL) provides a number of useful templates
93 * and command definitions.
94 * Common monitoring plugin command definitions are included seperately.
100 * The features-available directory contains a number of configuration
101 * files for features which can be enabled and disabled using the
102 * icinga2-enable-feature / icinga2-disable-feature tools. These two tools work by creating
103 * and removing symbolic links in the features-enabled directory.
105 include "features-enabled/*.conf"
107 This `include` directive takes care of including the configuration files for all
108 the features which have been enabled with `icinga2-enable-feature`. See
109 [Enabling/Disabling Features](#features) for more details.
112 * Although in theory you could define all your objects in this file
113 * the preferred way is to create separate directories and files in the conf.d
114 * directory. Each of these files must have the file extension ".conf".
116 include_recursive "conf.d"
118 You can put your own configuration files in the `conf.d` directory. This
119 directive makes sure that all of your own configuration files are included.
121 ### <a id="constants-conf"></a> constants.conf
123 The `constants.conf` configuration file can be used to define global constants:
126 * This file defines global constants which can be used in
127 * the other configuration files.
130 /* The directory which contains the plugins from the Monitoring Plugins project. */
131 const PluginDir = "/usr/lib/nagios/plugins"
133 /* Our local instance name. This should be the common name from the API certificate */
134 const NodeName = "localhost"
136 /* Our local zone name. */
137 const ZoneName = NodeName
140 ### <a id="localhost-conf"></a> localhost.conf
142 The `conf.d/localhost.conf` file contains our first host definition:
145 * A host definition. You can create your own configuration files
146 * in the conf.d directory (e.g. one per host). By default all *.conf
147 * files in this directory are included.
149 object Host "localhost" {
150 import "linux-server"
152 address = "127.0.0.1"
156 This defines the host `localhost`. The `import` keyword is used to import
157 the `linux-server` template which takes care of setting up the host check
158 as well as adding the host to the `linux-servers` host group.
160 The `vars` attribute can be used to define custom attributes which are available
161 for check and notification commands. Most of the templates in the Icinga
162 Template Library require an `address` custom attribute.
164 object Service "icinga" {
165 import "generic-service"
167 host_name = "localhost"
168 check_command = "icinga"
171 object Service "http" {
172 import "generic-service"
174 host_name = "localhost"
175 check_command = "http_ip"
178 object Service "ssh" {
179 import "generic-service"
181 host_name = "localhost"
182 check_command = "ssh"
185 object Service "load" {
186 import "generic-service"
188 host_name = "localhost"
189 check_command = "load"
192 object ScheduledDowntime "backup-downtime" {
193 import "backup-downtime"
195 host_name = "localhost"
196 service_name = "load"
199 object Service "processes" {
200 import "generic-service"
202 host_name = "localhost"
203 check_command = "processes"
206 object Service "users" {
207 import "generic-service"
209 host_name = "localhost"
210 check_command = "users"
213 object Service "disk" {
214 import "generic-service"
216 host_name = "localhost"
217 check_command = "disk"
220 The command object `icinga` for the embedded health check is provided by the
221 [Icinga Template Library (ITL)](#itl) while `http_ip`, `ssh`, `load`, `processes`,
222 `users` and `disk` are all provided by the plugin check commands which we enabled
223 earlier by including the `itl` and `plugins` configuration file.
227 > Instead of defining each service object and assigning it to a host object
228 > using the `host_name` attribute rather use the [apply rules](#apply)
229 > simplifying your configuration.
232 ## <a id="setting-up-check-plugins"></a> Setting up Check Plugins
234 On its own Icinga 2 does not know how to check external services. The
235 [Monitoring Plugins Project](https://www.monitoring-plugins.org/) provides
236 an extensive set of plugins which can be used with Icinga 2 to check whether
237 services are working properly.
239 The recommended way of installing these standard plugins is to use your
240 distribution's package manager.
244 > The `Nagios Plugins` project was renamed to `Monitoring Plugins`
245 > in January 2014. At the time of this writing the packages are still
246 > using the old name.
248 For your convenience here is a list of package names for some of the more
249 popular operating systems/distributions:
251 OS/Distribution | Package Name | Installation Path
252 -----------------------|--------------------|---------------------------
253 RHEL/CentOS (EPEL) | nagios-plugins-all | /usr/lib/nagios/plugins or /usr/lib64/nagios/plugins
254 Debian | nagios-plugins | /usr/lib/nagios/plugins
255 FreeBSD | nagios-plugins | /usr/local/libexec/nagios
256 OS X (MacPorts) | nagios-plugins | /opt/local/libexec
258 Depending on which directory your plugins are installed into you may need to
259 update the global `PluginDir` constant in your Icinga 2 configuration. This macro is used
260 by the service templates contained in the Icinga Template Library to determine
261 where to find the plugin binaries.
263 ### <a id="integrate-additional-plugins"></a> Integrate Additional Plugins
265 For some services you may need additional check plugins which are not provided
266 by the official Monitoring Plugins project.
268 All existing Nagios or Icinga 1.x plugins should work with Icinga 2. Here's a
269 list of popular community sites which host check plugins:
271 * [MonitoringExchange](https://www.monitoringexchange.org)
272 * [Icinga Wiki](https://wiki.icinga.org)
274 The recommended way of setting up these plugins is to copy them to a common directory
275 and create an extra global constant, e.g. `CustomPluginDir` in your `constants.conf`
278 # cp check_snmp_int.pl /opt/plugins
279 # chmod +x /opt/plugins/check_snmp_int.pl
281 # cat /etc/icinga2/constants.conf
283 * This file defines global constants which can be used in
284 * the other configuration files. At a minimum the
285 * PluginDir constant should be defined.
288 const PluginDir = "/usr/lib/nagios/plugins"
289 const CustomPluginDir = "/opt/monitoring"
291 Prior to using the check plugin with Icinga 2 you should ensure that it is working properly
292 by trying to run it on the console using whichever user Icinga 2 is running as:
294 # su - icinga -s /bin/bash
295 $ /opt/plugins/check_snmp_int.pl --help
297 Additional libraries may be required for some plugins. Please consult the plugin
298 documentation and/or README for installation instructions.
300 Each plugin requires a [CheckCommand](#objecttype-checkcommand) object in your
301 configuration which can be used in the [Service](#objecttype-service) or
302 [Host](#objecttype-host) object definition. Examples for `CheckCommand`
303 objects can be found in the [Plugin Check Commands](#plugin-check-commands) shipped
305 For further information on your monitoring configuration read the
306 [monitoring basics](#monitoring-basics).
309 ## <a id="configuring-ido"></a> Configuring IDO
311 The IDO (Icinga Data Output) modules for Icinga 2 take care of exporting all
312 configuration and status information into a database. The IDO database is used
313 by a number of projects including Icinga Web.
315 There is a separate module for each database back-end. At present support for
316 both MySQL and PostgreSQL is implemented.
318 Icinga 2 uses the Icinga 1.x IDOUtils database schema starting with version
319 `1.11.0`. Icinga 2 may require additional features not yet released with
320 Icinga 1.x and therefore require manual upgrade steps during pre-final
325 > Only install the IDO feature if your web interface or reporting tool requires
326 > you to do so (for example, [Icinga Web](#setting-up-icinga-web) or [Icinga Web 2](#setting-up-icingaweb2)).
327 > [Icinga Classic UI](#setting-up-icinga-classic-ui) does not use IDO as backend.
329 ### <a id="configuring-ido-mysql"></a> Configuring IDO MySQL
331 #### <a id="setting-up-mysql-db"></a> Setting up the MySQL database
333 First of all you have to install the `icinga2-ido-mysql` package using your
334 distribution's package manager. Once you have done that you can proceed with
335 setting up a MySQL database for Icinga 2:
339 > The Debian packages can optionally create and maintain the database for you
340 > using Debian's `dbconfig` framework. This is the recommended way of setting up
345 mysql> CREATE DATABASE icinga;
347 mysql> GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON icinga.* TO 'icinga'@'localhost' IDENTIFIED BY 'icinga';
352 After creating the database you can import the Icinga 2 IDO schema using the
355 # mysql -u root -p icinga < /usr/share/doc/icinga2-ido-mysql-*/schema/mysql.sql
357 The Icinga 2 RPM packages install the schema files into
358 `/usr/share/doc/icinga2-ido-mysql-*/schema` (`*` means package version).
360 On SuSE-based distributions the schema files are installed in
361 `/usr/share/doc/packages/icinga2-ido-mysql/schema`.
363 The Debian/Ubuntu packages put the schema files into
364 `/usr/share/icinga2-ido-mysql/schema`.
366 #### <a id="upgrading-mysql-db"></a> Upgrading the MySQL database
368 Check the `schema/upgrade` directory for an incremental schema upgrade file.
369 If there isn't an upgrade file available there's nothing to do.
373 > During pre release status (0.x.y releases) small snippets called for example
374 > `0.0.10.sql` will ship the required schema updates.
376 Apply all database schema upgrade files incrementially.
378 # mysql -u root -p icinga < /usr/share/doc/icinga2-ido-mysql-*/schema/upgrade/0.0.10.sql
380 The Icinga 2 IDO module will check for the required database schema version on startup
381 and generate an error message if not satisfied.
383 #### <a id="installing-ido-mysql"></a> Installing the IDO MySQL module
385 The package provides a new configuration file that is installed in
386 `/etc/icinga2/features-available/ido-mysql.conf`. You will need to update the
387 database credentials in this file.
389 You can enable the `ido-mysql` feature configuration file using `icinga2-enable-feature`:
391 # icinga2-enable-feature ido-mysql
392 Module 'ido-mysql' was enabled.
393 Make sure to restart Icinga 2 for these changes to take effect.
395 After enabling the ido-mysql feature you have to restart Icinga 2:
397 # /etc/init.d/icinga2 restart
400 ### <a id="configuring-ido-postgresql"></a> Configuring IDO PostgreSQL
402 #### Setting up the PostgreSQL database
404 First of all you have to install the `icinga2-ido-pgsql` package using your
405 distribution's package manager. Once you have done that you can proceed with
406 setting up a PostgreSQL database for Icinga 2:
410 > The Debian packages can optionally create and maintain the database for you
411 > using Debian's `dbconfig` framework. This is the recommended way of setting up
415 # sudo -u postgres psql -c "CREATE ROLE icinga WITH LOGIN PASSWORD 'icinga'";
416 # sudo -u postgres createdb -O icinga -E UTF8 icinga
417 # sudo -u postgres createlang plpgsql icinga
419 Locate your pg_hba.conf (Debian: `/etc/postgresql/*/main/pg_hba.conf`,
420 RHEL/SUSE: `/var/lib/pgsql/data/pg_hba.conf`), add the icinga user with md5
421 authentication method and restart the postgresql server.
423 # vim /var/lib/pgsql/data/pg_hba.conf
426 local icinga icinga md5
427 host icinga icinga 127.0.0.1/32 md5
428 host icinga icinga ::1/128 md5
430 # "local" is for Unix domain socket connections only
432 # IPv4 local connections:
433 host all all 127.0.0.1/32 ident
434 # IPv6 local connections:
435 host all all ::1/128 ident
437 # /etc/init.d/postgresql restart
440 After creating the database and permissions you can import the Icinga 2 IDO schema
441 using the following command:
443 # export PGPASSWORD=icinga
444 # psql -U icinga -d icinga < /usr/share/doc/icinga2-ido-pgsql-*/schema/pgsql.sql
446 The Icinga 2 RPM packages install the schema files into
447 `/usr/share/doc/icinga2-ido-pgsql-*/schema` (`*` means package version).
449 On SuSE-based distributions the schema files are installed in
450 `/usr/share/doc/packages/icinga2-ido-pgsql/schema`.
452 The Debian/Ubuntu packages put the schema files into
453 `/usr/share/icinga2-ido-pgsql/schema`.
455 #### <a id="upgrading-postgresql-db"></a> Upgrading the PostgreSQL database
457 Check the `schema/upgrade` directory for an incremental schema upgrade file.
458 If there isn't an upgrade file available there's nothing to do.
462 > During pre release status (0.x.y releases) small snippets called for example
463 > `0.0.10.sql` will ship the required schema updates.
465 Apply all database schema upgrade files incrementially.
467 # export PGPASSWORD=icinga
468 # psql -U icinga -d icinga < /usr/share/doc/icinga2-ido-pgsql-*/schema/upgrade/0.0.10.sql
470 The Icinga 2 IDO module will check for the required database schema version on startup
471 and generate an error message if not satisfied.
473 #### <a id="installing-ido-postgresql"></a> Installing the IDO PostgreSQL module
475 The package provides a new configuration file that is installed in
476 `/etc/icinga2/features-available/ido-pgsql.conf`. You will need to update the
477 database credentials in this file.
479 You can enable the `ido-pgsql` feature configuration file using `icinga2-enable-feature`:
481 # icinga2-enable-feature ido-pgsql
482 Module 'ido-pgsql' was enabled.
483 Make sure to restart Icinga 2 for these changes to take effect.
485 After enabling the ido-pgsql feature you have to restart Icinga 2:
487 # /etc/init.d/icinga2 restart
490 ## <a id="setting-up-livestatus"></a> Setting up Livestatus
492 The [MK Livestatus](http://mathias-kettner.de/checkmk_livestatus.html) project
493 implements a query protocol that lets users query their Icinga instance for
494 status information. It can also be used to send commands.
498 > Only install the Livestatus feature if your web interface or addon requires
499 > you to do so (for example, [Icinga Web 2](#setting-up-icingaweb2)).
500 > [Icinga Classic UI](#setting-up-icinga-classic-ui) and [Icinga Web](#setting-up-icinga-web)
501 > do not use Livestatus as backend.
503 The Livestatus component that is distributed as part of Icinga 2 is a
504 re-implementation of the Livestatus protocol which is compatible with MK
507 Details on the available tables and attributes with Icinga 2 can be found
508 in the [Livestatus Schema](#schema-livestatus) section.
510 You can enable Livestatus using icinga2-enable-feature:
512 # icinga2-enable-feature livestatus
514 After that you will have to restart Icinga 2:
516 # /etc/init.d/icinga2 restart
518 By default the Livestatus socket is available in `/var/run/icinga2/cmd/livestatus`.
520 In order for queries and commands to work you will need to add your query user
521 (e.g. your web server) to the `icingacmd` group:
523 # usermod -a -G icingacmd www-data
525 The Debian packages use `nagios` as the user and group name. Make sure to change `icingacmd` to
526 `nagios` if you're using Debian.
528 Change "www-data" to the user you're using to run queries.
530 In order to use the historical tables provided by the livestatus feature (for example, the
531 `log` table) you need to have the `CompatLogger` feature enabled. By default these logs
532 are expected in `/var/log/icinga2/compat`. A different path can be set using the `compat_log_path`
533 configuration attribute.
535 # icinga2-enable-feature compatlog
538 ## <a id="setting-up-icinga2-user-interfaces"></a> Setting up Icinga 2 User Interfaces
540 Icinga 2 is compatible to Icinga 1.x user interfaces by providing additional
541 features required as backends.
543 Furthermore these interfaces (and somewhere in the future an Icinga 2
544 exclusive interface) can be used for the newly created `Icinga Web 2`
547 Some interface features will only work in a limited manner due to
548 [compatibility reasons](#differences-1x-2), other features like the
549 statusmap parents are available dumping the host dependencies as parents.
550 Special restrictions are noted specifically in the sections below.
554 > Choose your preferred interface. There's no need to install [Classic UI](#setting-up-icinga-classic-ui)
555 > if you prefer [Icinga Web](#setting-up-icinga-web) or [Icinga Web 2](#setting-up-icingaweb2) for example.
557 ### <a id="setting-up-icinga-classic-ui"></a> Setting up Icinga Classic UI
559 Icinga 2 can write `status.dat` and `objects.cache` files in the format that
560 is supported by the Icinga 1.x Classic UI. External commands (a.k.a. the
561 "command pipe") are also supported. It also supports writing Icinga 1.x
562 log files which are required for the reporting functionality in the Classic UI.
564 #### <a id="installing-icinga-classic-ui"></a> Installing Icinga Classic UI
566 The Icinga package repository has both Debian and RPM packages. You can install
567 the Classic UI using the following packages:
569 Distribution | Packages
570 --------------|---------------------
571 Debian | icinga2-classicui
572 all others | icinga2-classicui-config icinga-gui
574 The Debian packages require additional packages which are provided by the
575 [Debian Monitoring Project](http://www.debmon.org) repository.
577 On all distributions other than Debian you may have to restart both your web
578 server as well as Icinga 2 after installing the Classic UI package.
580 Verify that your Icinga 1.x Classic UI works by browsing to your Classic
583 Distribution | URL | Default Login
584 --------------|--------------------------------------------------------------------------|--------------------------
585 Debian | [http://localhost/icinga2-classicui](http://localhost/icinga2-classicui) | asked during installation
586 all others | [http://localhost/icinga](http://localhost/icinga) | icingaadmin/icingaadmin
588 ### <a id="setting-up-icinga-web"></a> Setting up Icinga Web
590 Icinga 2 can write to the same schema supplied by `Icinga IDOUtils 1.x` which
591 is an explicit requirement to run `Icinga Web` next to the external command pipe.
592 Therefore you need to setup the [DB IDO feature](#configuring-ido) remarked in the previous sections.
594 #### <a id="installing-icinga-web"></a> Installing Icinga Web
596 The Icinga package repository has both Debian and RPM packages. You can install
597 the Classic UI using the following packages:
599 Distribution | Packages
600 --------------|-------------------------------------
601 RHEL/SUSE | icinga-web icinga-web-{mysql,pgsql}
604 Additionally you need to setup the `icinga_web` database.
606 The Icinga Web RPM packages install the schema files into
607 `/usr/share/doc/icinga-web-*/schema` (`*` means package version).
608 The Icinga Web dist tarball ships the schema files in `etc/schema`.
610 On SuSE-based distributions the schema files are installed in
611 `/usr/share/doc/packages/icinga-web/schema`.
613 Icinga Web requires the IDO feature as database backend using MySQL or PostgreSQL.
614 Enable that feature, e.g. for MySQL.
616 # icinga2-enable-feature ido-mysql
618 If you've changed your default credentials you may either create a read-only user
619 or use the credentials defined in the IDO feature for Icinga Web backend configuration.
620 Edit `databases.xml` accordingly and clear the cache afterwards. Further details can be
621 found in the [Icinga Web documentation](http://docs.icinga.org/latest/en/icinga-web-config.html).
623 # vim /etc/icinga-web/conf.d/databases.xml
625 # icinga-web-clearcache
627 Additionally you need to enable the `command` feature:
629 # icinga2-enable-feature command
631 Then edit the Icinga Web configuration for sending commands in `/etc/icinga-web/conf.d/access.xml`
632 (RHEL) or `/etc/icinga-web/access.xml` (SUSE) setting the command pipe path
633 to the default used in Icinga 2. Make sure to clear the cache afterwards.
635 # vim /etc/icinga-web/conf.d/access.xml
639 <resource name="icinga_pipe">/var/run/icinga2/cmd/icinga.cmd</resource>
643 # icinga-web-clearcache
645 Verify that your Icinga 1.x Web works by browsing to your Web installation URL:
647 Distribution | URL | Default Login
648 --------------|-------------------------------------------------------------|--------------------------
649 Debian | [http://localhost/icinga-web](http://localhost/icinga-web) | asked during installation
650 all others | [http://localhost/icinga-web](http://localhost/icinga-web) | root/password
653 ### <a id="setting-up-icingaweb2"></a> Setting up Icinga Web 2
655 Icinga Web 2 currently supports `status.dat`, `DB IDO`, or `Livestatus` as backends.
656 Please consult the INSTALL documentation shipped with `Icinga Web 2` for
657 further instructions.
659 Icinga Web 2 is still under development. Rather than installing it
660 yourself you should consider testing it using the available Vagrant
664 ### <a id="additional-visualization"></a> Additional visualization
666 There are many visualization addons which can be used with Icinga 2.
668 Some of the more popular ones are PNP, inGraph (graphing performance data),
669 Graphite, and NagVis (network maps).
672 ## <a id="configuration-tools"></a> Configuration Tools
674 Well known configuration tools for Icinga 1.x such as [LConf](http://www.netways.de/en/de/produkte/icinga/addons/lconf/),
675 [NConf](http://www.nconf.org/) or [NagiosQL](http://www.nagiosql.org/)
676 store their configuration in a custom format in their backends (LDAP or RDBMS).
677 Currently only LConf 1.4.x supports Icinga 2 configuration export. If you require
678 your favourite configuration tool to export Icinga 2 configuration, please get in
679 touch with their developers.
681 If you're looking for puppet manifests, chef cookbooks, ansible recipes, etc - we're happy
682 to integrate them upstream, so please get in touch at [https://support.icinga.org](https://support.icinga.org).
685 ## <a id="running-icinga2"></a> Running Icinga 2
687 ### <a id="init-script"></a> Init Script
689 Icinga 2's init script is installed in `/etc/init.d/icinga2` by default:
691 # /etc/init.d/icinga2
692 Usage: /etc/init.d/icinga2 {start|stop|restart|reload|checkconfig|status}
694 Command | Description
695 --------------------|------------------------
696 start | The `start` action starts the Icinga 2 daemon.
697 stop | The `stop` action stops the Icinga 2 daemon.
698 restart | The `restart` action is a shortcut for running the `stop` action followed by `start`.
699 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.
700 checkconfig | The `checkconfig` action checks if the `/etc/icinga2/icinga2.conf` configuration file contains any errors.
701 status | The `status` action checks if Icinga 2 is running.
703 By default the Icinga 2 daemon is running as `icinga` user and group
704 using the init script. Using Debian packages the user and group are set to `nagios`
705 for historical reasons.
707 ### <a id="cmdline"></a> Command-line Options
710 icinga2 - The Icinga 2 network monitoring daemon.
713 --help show this help message
714 -V [ --version ] show version information
715 -l [ --library ] arg load a library
716 -I [ --include ] arg add include search directory
717 -D [ --define] args define a constant
718 -c [ --config ] arg parse a configuration file
719 -C [ --validate ] exit after validating the configuration
720 -x [ --debug ] enable debugging
721 -d [ --daemonize ] detach from the controlling terminal
722 -e [ --errorlog ] arg log fatal errors to the specified log file (only works
723 in combination with --daemonize)
724 -u [ --user ] arg user to run Icinga as
725 -g [ --group ] arg group to run Icinga as
727 Report bugs at <https://dev.icinga.org/>
728 Icinga home page: <http://www.icinga.org/>
732 Instead of loading libraries using the [`library` config directive](#library)
733 you can also use the `--library` command-line option.
737 [Global constants](#global-constants) can be set using the `--define` command-line option.
739 #### Config Include Path
741 When including files you can specify that the include search path should be
742 checked. You can do this by putting your configuration file name in angle
747 This would cause Icinga 2 to search its include path for the configuration file
748 `test.conf`. By default the installation path for the Icinga Template Library
749 is the only search directory.
751 Using the `--include` command-line option additional search directories can be
756 Using the `--config` option you can specify one or more configuration files.
757 Config files are processed in the order they're specified on the command-line.
759 #### Config Validation
761 The `--validate` option can be used to check if your configuration files
762 contain errors. If any errors are found the exit status is 1, otherwise 0
765 ### <a id="features"></a> Enabling/Disabling Features
767 Icinga 2 provides configuration files for some commonly used features. These
768 are installed in the `/etc/icinga2/features-available` directory and can be
769 enabled and disabled using the `icinga2-enable-feature` and `icinga2-disable-feature` tools,
772 The `icinga2-enable-feature` tool creates symlinks in the `/etc/icinga2/features-enabled`
773 directory which is included by default in the example configuration file.
775 You can view a list of available feature configuration files:
777 # icinga2-enable-feature
778 Syntax: icinga2-enable-feature <feature>
779 Enables the specified feature.
781 Available features: statusdata
783 Using the `icinga2-enable-feature` command you can enable features:
785 # icinga2-enable-feature statusdata
786 Module 'statusdata' was enabled.
787 Make sure to restart Icinga 2 for these changes to take effect.
789 You can disable features using the `icinga2-disable-feature` command:
791 # icinga2-disable-feature statusdata
792 Module 'statusdata' was disabled.
793 Make sure to restart Icinga 2 for these changes to take effect.
795 The `icinga2-enable-feature` and `icinga2-disable-feature` commands do not
796 restart Icinga 2. You will need to restart Icinga 2 using the init script
797 after enabling or disabling features.
800 ## <a id="vagrant"></a> Vagrant Demo VM
802 The Icinga 2 Git repository contains support for [Vagrant](http://docs.vagrantup.com/v2/)
803 with VirtualBox. Please note that Vagrant version `1.0.x` is not supported. At least
804 version `1.2.x` is required.
806 In order to build the Vagrant VM first you will have to check out
809 $ git clone git://git.icinga.org/icinga2.git
811 Once you have checked out the Git repository you can build the VM using the
816 The Vagrant VM is based on CentOS 6.x and uses the official Icinga 2 RPM
817 packages from `packages.icinga.org`. The check plugins are installed from
818 EPEL providing RPMs with sources from the Monitoring Plugins project.
820 ### <a id="vagrant-demo-guis"></a> Demo GUIs
822 In addition to installing Icinga 2 the Vagrant puppet modules also install the
823 Icinga 1.x Classic UI and Icinga Web.
825 GUI | Url | Credentials
826 ----------------|----------------------------------------------------------------------|------------------------
827 Classic UI | [http://localhost:8080/icinga](http://localhost:8080/icinga) | icingaadmin / icingaadmin
828 Icinga Web | [http://localhost:8080/icinga-web](http://localhost:8080/icinga-web) | root / password
831 ### <a id="vagrant-ssh"></a> SSH Access
833 You can access the Vagrant VM using SSH:
837 Alternatively you can use your favorite SSH client:
840 ----------------|----------------