Professional Documents
Culture Documents
General Requirements Setup IDOUtils MySQL Postgresql Config SELinux GUI IDOUtils idomod.cfg ido2db.cfg Upgrading IDOUtils Package paths may differ! Check Package Specific Locations
General
What will you get once Icinga with IDOUtils using this guide is installed? Icinga Core Icinga Classic UI (the "CGIs") Icinga IDOUtils Mysql or Postgresql as database Icinga Docs If you came here looking for Icinga Web Setup, please check: Setting up Icinga Web on RHEL. Packages are preferred for upgrading and maintenance easyness. Currently, there's only a bug open to bring Icinga upstream into EPEL - https://bugzilla.redhat.com/show_bug.cgi?id=693608 Packagers welcome! It's the nature of packages that they can take a bit longer because testing and so on needs to be run on various procedures and platform. If you can't wait that long, build your own rpms here: Build Icinga RPMs
Requirements
For oracle, you will need ocilib instead of libdbi, and a special configure flag for the packages themselves. This is not described with this guide.
esources/Repositories/RPMForge After adding repoforge, you can invoke a simple search for yum with
Setup
# yum install icinga icinga-gui icinga-doc icinga-idoutils-libdbi-mysql or # yum install icinga icinga-gui icinga-doc icinga-idoutils-libdbi-pgsql
IDOUtils
After having installed the packages, make sure to setup your database accordingly. The icinga-idoutils package provides the libdbi database abstraction layer, where you need to install the according drivers then. Icinga 1.7.0 will require libdbi-dbd-* in their defined package.
This will of course require a valid MySQL or Postgresql Server to be already installed.
# yum install mysql-server mysql-client libdbi1 libdbi-dev libdbd-mysql or # yum install postgresql libdbi1 libdbi-dev libdbd-pgsql
The SQL schema scripts are located in /usr/share/doc/icinga-idoutils-libdbi-*/db (1.7.0), please read the README.RHEL.idoutils for more information.
# less /usr/share/docs/icinga-idoutils-libdbi-*/README.RHEL.idoutils
MySQL
# mysql mysql> CREATE DATABASE icinga; mysql> GRANT USAGE ON icinga.* TO 'icinga'@'localhost' IDENTIFIED BY 'icinga' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0; mysql> GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON icinga.* TO 'icinga'@'localhost'; mysql> FLUSH PRIVILEGES; mysql> quit
Postgresql
# su - postgres postgres@icinga-dev:~$ psql template1 psql (9.1.2) Type "help" for help. template1=# create database icinga; CREATE DATABASE template1=# \q postgres@icinga-dev:~$ createlang plpgsql icinga postgres@icinga-dev:~$ psql psql (9.1.2) Type "help" for help. postgres=# create role icinga; CREATE ROLE postgres=# alter role icinga login; ALTER ROLE postgres=# grant all on database icinga to icinga; GRANT postgres=# \q
Now that Postgresql does use a local user to be trusted (insecure, but good as startup), edit pg_hba.conf accordingly. See Postgresql Manual for a more advanced setup on user auth and privilegues.
# "local" is for Unix domain socket connections only local all all # IPv4 local connections: host all all 127.0.0.1/32 # IPv6 local connections: host all all ::1/128 #icinga local icinga host icinga host icinga
trust trust
Config
There's not much to do anymore. The main config tree is located in
# /etc/icinga/
SELinux
Disable it or submit a proper selinux policy.
GUI
IDOUtils
DO NOT EDIT icinga.cfg for broker_module entry!!! Icinga RPMs will use the /etc/icinga/modules/idoutils.cfg with the module definition automatically. Defining that twice can lead into strange errors!
Verify that by looking into the modules/idoutils.cfg file Icinga 1.7.0 Changes: /usr/bin/idomod.o will be /usr/lib64/icinga/idomod.so
Other event broker modules can be defined using this module definition as well.
idomod.cfg
Decide wether to use unix or tcp sockets, as well as some more as described in ?Optimize IDOUtils performance
ido2db.cfg
Edit your database credentials here, if changed above on creation.
Upgrading
# yum install icinga icinga-gui icinga-doc icinga-idoutils-libdbi-mysql or # yum install icinga icinga-gui icinga-doc icinga-idoutils-libdbi-pgsql
IDOUtils
There is no db upgrade script like in Debian, so you need to keep track of that yourself. First, get the schema version
# mysql icinga mysql> SELECT * FROM icinga_dbversion; +--------------+----------+---------+---------------------+--------------------+ | dbversion_id | name | version | create_time | modify_time | +--------------+----------+---------+---------------------+--------------------+ | 1 | idoutils | 1.7.0 | 2012-05-14 17:46:50 | 2012-05-14 17:46:50 | +--------------+----------+---------+---------------------+--------------------+ 1 row in set (0.00 sec)
and then decide, what to do - based on the official upgrade docs here: http://docs.icinga.org/latest/en/upgrading_ido utils.html i.e. upgrading to version 1.7.0 is just one incremential step, so this would mean to apply the now installed upgrade script.
Remember, that upgrades needs to be done incremental, so if there will be 1.8.0 from 1.6.0. you need to apply both steps.
icinga < mysql-upgrade-1.7.0.sql upgrade ok> icinga < mysql-upgrade-1.8.0.sql upgrade ok>