• Setting up Icinga Web on RHEL
Skip to end of metadata
Go to start of metadata
Icon

Icinga Web requires at least PHP 5.2.6 and PCRE with unicode support - at least RHEL 5.7 and php53 https://dev.icinga.org/issues/466. It does not work on OpenSUSE 10.2 (https://dev.icinga.org/issues/3030)

Icon

Package paths may differ! Check Package Specific Locations

 

General

What will you get once Icinga Web using this guide is installed?

  • Icinga Web
  • optional PNP Integration (this still requires PNP to be installed, e.g. here.

Repoforge ships Icinga Web since 1.7.2 release, but you can also create your own RPMs as well using the tarball provided spec file - Build Icinga RPMs

Icon

Please look at https://www.icinga.org/download/packages/ for available package repositories.

 

Requirements

If using the RHEL 5.x tree, it will be advised to upgrade to at least 5.7 where php53 and pcre components will resolve the PCRE unicode issues - at least some users report that. Otherwise, external repositories providing upgraded PHP and PCRE packages are still needed. See official docs on the Web install for some insights.
On the 6.x tree, there are no special dependencies in this regard anymore.

Depending on the used backend, install the applicable php connector (php-mysql, php-pgsql, oracle special again).

# yum install php php-cli php-pear php-xmlrpc php-xsl php-pdo php-soap php-gd php-ldap php-mysql

Setup

Icon

Choose whether to install Packages or Source.

README

The package ships /usr/share/doc/icinga-web*/README.RHEL which can be found in the upstream GIT repo as well: https://git.icinga.org/?p=icinga-web.git;a=blob_plain;f=doc/README.RHEL;hb=refs/heads/next

Icon

Make sure to read that upon first install!

 

Packages

# yum install icinga-web icinga-web-module-pnp

 

The default will end up like this (when following src install below, or the icinga-web.spec RPMs)

  • /etc/icinga-web/conf.d with xml Config
  • /usr/share/icinga-web as data root dir (where the php, js will live)
  • /etc/httpd/conf.d/icinga-web.conf apache config
  • The guide on Setting up Icinga with IDOUtils on RHEL will install the Icinga command pipe to /var/spool/icinga/cmd/icinga.cmd
  • /var/log/icinga-web will contain all log files
  • /var/cache/icinga-web will contain all config cached files (and clearcache.sh will know about it)
Icon

Pro Tip: packages will keep your configs save by a special noreplace macro!

Source

We are trying to stay FHS compliant, so the we are pretending to install a package with various configure parameters.

# ./configure --prefix=/usr/share/icinga-web --datadir=/usr/share/icinga-web --datarootdir=/usr/share/icinga-web --with-web-user=apache --with-web-group=apache --with-conf-dir=/etc/icinga-web/conf.d --with-web-apache-path=/etc/httpd/conf.d --with-api-cmd-file=/var/spool/icinga/cmd/icinga.cmd --with-log-dir=/var/log/icinga-web --with-cache-dir=/var/cache/icinga-web
# make install
# make install-apache-config

Please be advised not to run "make install" on upgrades, rather run "make upgrade" for not touching our configs in /etc/icinga-web.

Database Setup

Icinga Web uses its own database backend, e.g. to store user auth (named "auth provider internal" in logs) or sessions or saved cronks, principals, etc.

So in order to use that, create a seperated database and import the provided schema. See Setting up Icinga with IDOUtils on RHEL for an advanced guide for setting up databases. Below a MySQL example

Make sure, mysql is installed (like described as dependency in Icinga with IDOUtils Setup).

 # mysql -u root -p
 mysql> CREATE DATABASE icinga_web;
        GRANT USAGE ON *.* TO 'icinga_web'@'localhost' IDENTIFIED BY 'icinga_web' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0;
        GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX ON icinga_web.* TO 'icinga_web'@'localhost';
        quit

Import the schema.

# mysql -u root -p icinga_web <  /usr/share/doc/icinga-web-<version>/schema/mysql.sql

Config

All upgradesafe configs are deployed within /etc/icinga-web/conf.d

Check the official docs for a deeper introduction into configuration of Icinga Web: http://docs.icinga.org/latest/en/icinga-web-config.html

When editing the configs, make sure to clean the config cache afterwards by deleting all *.php files in /var/cache/icinga-web/ or invoking

# /usr/share/icinga-web/bin/clearcache.sh
Icon

As of 1.6.2, the package will use /usr/bin/icinga-web-clearcache instead of location above.

Login

Default credentials are as follows

UrlUserPass
http://localhost/icinga-webrootpassword

 

Command file

If you need to set a custom location, check the access.xml and clear the config cache after changes.

http://docs.icinga.org/latest/en/icinga-web-config.html#configweb-access

IDOUtils DB Credentials

If the setup remains the default, idoutils db settings will be correct & working. if you chose to change the db credentials, please update that in databases.xml and run $ icinga-web/bin/clearcache.sh

are comments and will be ignored by Icinga Web!

Remove the comment markers and set to appropriate IDOUtils DB Credentials (as noted in Icinga with IDOUtils Setup) and clear the config cache afterwards.

Clear the cache after editing the config.

# /usr/share/icinga-web/bin/clearcache.sh

Upgrade

Always keep a backup of /etc/icinga-web and your database.

Packages

Packages won't touch your config or database, unless there's release critical changes.

# yum update icinga-web

 

Source

Basically the same as the default setup, but in order not to overwrite the Configs in /etc/icinga-web use make upgrade.

 * make upgrade       Upgrades an existing installation:
                      keep site config files untouched!

Database

Please apply the provided icinga-web db schemas like described in the official docs here: http://docs.icinga.org/latest/en/upgrading_icingaweb.html

  • No labels