2013-06-03 11:24:24 +02:00
|
|
|
# Icinga 2 Web
|
2013-05-29 17:34:18 +02:00
|
|
|
|
2013-06-03 11:24:24 +02:00
|
|
|
## Table of Contents
|
2013-05-29 17:34:18 +02:00
|
|
|
|
|
|
|
1. [Vagrant - Virtual development environment](#vagrant)
|
|
|
|
|
2013-06-04 12:42:18 +02:00
|
|
|
## Vagrant
|
2013-05-29 17:34:18 +02:00
|
|
|
|
|
|
|
The Icinga 2 Web 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:
|
|
|
|
|
2013-06-03 11:24:24 +02:00
|
|
|
vagrant up
|
|
|
|
|
2013-06-06 12:27:28 +02:00
|
|
|
> **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.
|
|
|
|
|
2013-06-03 11:24:24 +02:00
|
|
|
After you should be able to browse [localhost:8080/icinga2-web](http://localhost:8080/icinga2-web).
|
|
|
|
|
2013-06-04 12:42:18 +02:00
|
|
|
### Environment
|
2013-06-03 11:24:24 +02:00
|
|
|
|
2013-06-03 17:54:44 +02:00
|
|
|
**Forwarded ports**:
|
2013-06-03 11:24:24 +02:00
|
|
|
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<th>Proctocol</th>
|
|
|
|
<th>Local port (virtual machine host)</th>
|
|
|
|
<th>Remote port (the virtual machine)</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>SSH</td>
|
|
|
|
<td>2222</td>
|
|
|
|
<td>22</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>HTTP</td>
|
|
|
|
<td>8080</td>
|
|
|
|
<td>80</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
2013-06-03 17:54:44 +02:00
|
|
|
**Installed packages**:
|
2013-06-03 11:24:24 +02:00
|
|
|
|
2013-06-04 12:42:18 +02:00
|
|
|
* Apache2 with PHP enabled
|
|
|
|
* PHP with MySQL and PostgreSQL libraries
|
2013-06-03 11:24:24 +02:00
|
|
|
* MySQL server and client software
|
|
|
|
* PostgreSQL server and client software
|
2013-06-03 17:54:44 +02:00
|
|
|
* [Icinga prerequisites](http://docs.icinga.org/latest/en/quickstart-idoutils.html#installpackages)
|
2013-06-03 11:24:24 +02:00
|
|
|
|
2013-06-03 17:54:44 +02:00
|
|
|
**Installed users and groups**:
|
2013-06-03 11:24:24 +02:00
|
|
|
|
|
|
|
* User icinga with group icinga and icinga-cmd
|
|
|
|
* Webserver user added to group icinga-cmd
|
|
|
|
|
2013-06-03 17:54:44 +02:00
|
|
|
**Installed software**:
|
|
|
|
|
|
|
|
* Icinga 1.9.1 with IDOUtils using a MySQL database
|
|
|
|
* Icinga 1.9.1 with IDOUtils using a PostgreSQL database
|
|
|
|
|
2013-06-04 12:42:18 +02:00
|
|
|
**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 1.4.16 for both icinga instances
|
|
|
|
|
|
|
|
#### Icinga with IDOUtils using a MySQL database
|
2013-06-03 17:54:44 +02:00
|
|
|
|
|
|
|
**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](http://localhost:8080/icinga-mysql).
|
2013-06-04 12:42:18 +02:00
|
|
|
For **logging into** the Icinga classic web interface use user *icingaadmin* with password *icinga*.
|
2013-06-03 18:01:49 +02:00
|
|
|
|
2013-06-04 12:42:18 +02:00
|
|
|
#### Icinga with IDOUtils using a PostgreSQL database
|
2013-06-03 18:01:49 +02:00
|
|
|
|
|
|
|
**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](http://localhost:8080/icinga-pgsql).
|
2013-06-04 12:42:18 +02:00
|
|
|
For **logging into** the Icinga classic web interface use user *icingaadmin* with password *icinga*.
|
2013-06-04 14:27:13 +02:00
|
|
|
|
|
|
|
#### MK Livestatus
|
|
|
|
|
|
|
|
MK Livestatus is added to the Icinga installation using a MySQL database.
|
|
|
|
|
|
|
|
**Installation path**:
|
2013-06-06 12:27:28 +02:00
|
|
|
|
2013-06-04 14:27:13 +02:00
|
|
|
* `/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`
|
|
|
|
|
2013-06-06 12:27:28 +02:00
|
|
|
**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: uid=jdoe,ou=people,dc=icinga,dc=rg
|
|
|
|
> uniqueMember: uid=jsmith,ou=people,dc=icinga,dc=rg
|
|
|
|
> uniqueMember: uid=jqpublic,ou=people,dc=icinga,dc=rg
|
|
|
|
> uniqueMember: uid=jroe,ou=people,dc=icinga,dc=rg
|
|
|
|
>
|
|
|
|
> 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: jroe
|
|
|
|
|
|
|
|
All users share the password `password`.
|