A lightweight and extensible web interface to keep an eye on your environment. Analyse problems and act on them.
Go to file
Thomas Gelf cf6f1f8bf4 icinga/loader.js: play nice with invalid responses
Even responses with no HTML or no root node or similar must be rendered
successfully to their containers.
2014-05-28 15:59:42 +00:00
.vagrant-puppet Install icingacli and bash completion in Vagrant VM 2014-05-23 15:26:46 +02:00
application CLI/ModuleCommand: helpful message with no module 2014-05-28 11:45:58 +00:00
bin More consistent default config dir handling, less configuration 2014-04-17 16:59:10 +00:00
config Enable logging and make the file resource definition using the new log syntax 2014-04-30 09:10:23 +02:00
doc Documentation: Fix missing preferences*,sql 2014-05-20 11:11:32 +02:00
etc Make icingacli bash completion working 2014-05-22 16:31:18 +02:00
library Chart\InlinePie: locale-ignorant casts for floats 2014-05-28 10:20:34 +00:00
modules monitoring/IdoQuery: 2014-05-28 09:39:38 +00:00
packages packages/debian: initial commit, basic sample 2014-05-20 23:33:04 +00:00
public icinga/loader.js: play nice with invalid responses 2014-05-28 15:59:42 +00:00
test/php Rename Icinga\Logger\Writer\StreamWriter to FileWriter 2014-04-30 11:59:22 +02:00
var/log Fixed executable flags on normal files. 2014-02-18 09:42:13 +01:00
.gitignore Refactor spec file and make rhel rpms work again. 2014-05-13 00:27:06 +02:00
COPYING License writer 2013-07-03 14:17:48 +02:00
Makefile.in Disable tarball targets in Makefile 2014-02-21 15:27:09 +00:00
README.md Rename Icinga 2 Web to Icinga Web 2 2013-10-23 15:11:06 +02:00
Vagrantfile Vagrant: Mount /vagrant/var/log/ writable for apache 2013-08-16 17:51:39 +02:00
aclocal.m4 Fixed executable flags on normal files. 2014-02-18 09:42:13 +01:00
configure Remove obsolete css.php from configure 2014-03-31 09:00:13 +00:00
configure.ac Remove obsolete css.php from configure 2014-03-31 09:00:13 +00:00
icingaweb2.spec spec: Fix enabled module symlink 2014-05-13 19:39:23 +02:00
install-sh Add local install-sh 2013-07-03 14:07:55 +02:00

README.md

Icinga Web 2

Table of Contents

  1. Vagrant - Virtual development environment

Vagrant

Note that the deployment of the virtual machine is tested against Vagrant starting with version 1.1. Unfortunately older versions will not work.

The Icinga Web 2 project ships with a Vagrant virtual machine that integrates the source code with various services and example data in a controlled environment. This enables developers and users to test Livestatus, status.dat, MySQL and PostgreSQL backends as well as the LDAP authentication. All you have to do is install Vagrant and run:

vagrant up

Note that the first boot of the vm takes a fairly long time because you'll download a plain CentOS base box and Vagrant will automatically provision the environment on the first go.

After you should be able to browse localhost:8080/icingaweb.

Environment

Forwarded ports:

Proctocol Local port (virtual machine host) Remote port (the virtual machine)
SSH 2222 22
HTTP 8080 80

Installed packages:

  • Apache2 with PHP enabled
  • PHP with MySQL and PostgreSQL libraries
  • MySQL server and client software
  • PostgreSQL server and client software
  • Icinga prerequisites
  • OpenLDAP servers and clients

Installed users and groups:

  • User icinga with group icinga and icinga-cmd
  • Webserver user added to group icinga-cmd

Installed software:

  • Icinga with IDOUtils using a MySQL database
  • Icinga with IDOUtils using a PostgreSQL database
  • Icinga 2

Installed files:

  • /usr/share/icinga/htpasswd.users account information for logging into the Icinga classic web interface for both icinga instances
  • /usr/lib64/nagios/plugins Nagios Plugins for both icinga instances

Icinga with IDOUtils using a MySQL database

Installation path: /usr/local/icinga-mysql

Services:

  • icinga-mysql
  • ido2db-mysql

Connect to the icinga mysql database using the following command:

mysql -u icinga -p icinga icinga

Access the Classic UI (CGIs) via localhost:8080/icinga-mysql. For logging into the Icinga classic web interface use user icingaadmin with password icinga.

Icinga with IDOUtils using a PostgreSQL database

Installation path: /usr/local/icinga-pgsql

Services:

  • icinga-pgsql
  • ido2db-pgsql

Connect to the icinga mysql database using the following command:

sudo -u postgres psql -U icinga -d icinga

Access the Classic UI (CGIs) via localhost:8080/icinga-pgsql. For logging into the Icinga classic web interface use user icingaadmin with password icinga.

Monitoring Test Config

Test config is added to both the MySQL and PostgreSQL Icinga instance utilizing the Perl module Monitoring::Generator::TestConfig to generate test config to /usr/local/share/misc/monitoring_test_config which is then copied to /etc/conf.d/test_config/. Configuration can be adjusted and recreated with /usr/local/share/misc/monitoring_test_config/recreate.pl. Note that you have to run

vagrant provision

in the host after any modification to the script just mentioned.

MK Livestatus

MK Livestatus is added to the Icinga installation using a MySQL database.

Installation path:

  • /usr/local/icinga-mysql/bin/unixcat
  • /usr/local/icinga-mysql/lib/mk-livestatus/livecheck
  • /usr/local/icinga-mysql/lib/mk-livestatus/livestatus.o
  • /usr/local/icinga-mysql/etc/modules/mk-livestatus.cfg
  • /usr/local/icinga-mysql/var/rw/live

Example usage:

echo "GET hosts" | /usr/local/icinga-mysql/bin/unixcat /usr/local/icinga-mysql/var/rw/live

LDAP example data

The environment includes a openldap server with example data. Domain suffix is dc=icinga,dc=org. Administrator (rootDN) of the slapd configuration database is cn=admin,cn=config and the administrator (rootDN) of our database instance is cn=admin,dc=icinga,dc=org. Both share the password admin.

Examples to query the slapd configuration database:

ldapsearch -x -W -LLL -D cn=admin,cn=config -b cn=config dn
ldapsearch -Y EXTERNAL -H ldapi:/// -LLL -b cn=config dn

Examples to query our database instance:

ldapsearch -x -W -LLL -D cn=admin,dc=icinga,dc=org -b dc=icinga,dc=org dn
ldapsearch -Y EXTERNAL -H ldapi:/// -LLL -b dc=icinga,dc=org dn

This is what the dc=icinga,dc=org DIT looks like:

dn: dc=icinga,dc=org

dn: ou=people,dc=icinga,dc=org

dn: ou=groups,dc=icinga,dc=org

dn: cn=Users,ou=groups,dc=icinga,dc=org cn: Users uniqueMember: cn=Jon Doe,ou=people,dc=icinga,dc=org uniqueMember: cn=Jane Smith,ou=people,dc=icinga,dc=org uniqueMember: cn=John Q. Public,ou=people,dc=icinga,dc=org uniqueMember: cn=Richard Roe,ou=people,dc=icinga,dc=org

dn: cn=John Doe,ou=people,dc=icinga,dc=org cn: John Doe uid: jdoe

dn: cn=Jane Smith,ou=people,dc=icinga,dc=org cn: Jane Smith uid: jsmith

dn: cn=John Q. Public,ou=people,dc=icinga,dc=org cn: John Q. Public uid: jqpublic

dn: cn=Richard Roe,ou=people,dc=icinga,dc=org cn: Richard Roe uid: rroe

All users share the password password.

Testing the code

All software required to run tests is installed in the virtual machine. In order to run all tests you have to execute the following commands:

vagrant ssh -c /vagrant/test/php/runtests
vagrant ssh -c /vagrant/test/php/checkswag
vagrant ssh -c /vagrant/test/js/runtests
vagrant ssh -c /vagrant/test/js/checkswag
vagrant ssh -c /vagrant/test/frontend/runtests

runtests will execute unit and regression tests and checkswag will report code style issues.

Icinga 2

Installation path: /usr/local/icinga2

Example usage:

cd /usr/local/icinga2
./sbin/icinga2 -c etc/icinga2/icinga2.conf.dist

Log into Icinga Web 2

If you've configure LDAP as authentication backend (which is the default) use the following login credentials:

Username: jdoe Password: password

Have a look at [LDAP example data](#ldap example data) for more accounts.