File README.SUSE.idoutils of Package icinga.25874
IDOUtils Notes for SUSE packages
================================
CHANGES for 1.7
* bindir/idomod.o => libdir/idomod.so
* /var/lib/icinga => /var/spool/icinga
* /usr/lib/nagios/plugins/eventhandlers => /usr/lib/icinga/eventhandler
* /var/spool/icinga/icinga.cmd => /var/run/icinga/icinga.cmd
* /var/spool/icinga/ido2db.sock => /var/run/icinga/ido2db.sock
==============
= IDOMOD Setup
==============
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 unwanted errors!
Verify that by looking into the modules/idoutils.cfg file
# vim /etc/icinga/modules/idoutils.cfg
Other event broker modules can be defined using this module definition as well.
==============
= IDO2DB Setup
==============
Edit your database credentials in ido2db.cfg ...
# vim /etc/icinga/ido2db.cfg
db_servertype=mysql
#db_servertype=pgsql
db_host=localhost
db_port=3306
#db_port=5432
db_name=icinga
db_prefix=icinga_
db_user=icinga
db_pass=icinga
... and create the database like described below.
-------
- MySQL
-------
Create Database, User, Grants
-----------------------------
# mysql -u root -p
mysql> CREATE DATABASE icinga;
Query OK, 1 row affected (0.01 sec)
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
ON icinga.* TO 'icinga'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> quit
Import database schema
----------------------
# cd /usr/share/doc/packages/icinga-idoutils-mysql/mysql
# mysql -u root -p icinga < mysql.sql
------------
- Postgresql
------------
Create Database, User, Grants
-----------------------------
# su - postgres
postgres:~$ psql template1
template1=# create database icinga;
template1=# \q
postgres:~$ createlang plpgsql icinga
postgres:~$ psql
postgres=# create role icinga;
postgres=# alter role icinga login;
postgres=# grant all on database icinga to icinga;
postgres=# \q
Import database schema
----------------------
postgres:~$ cd /usr/share/doc/packages/icinga-idoutils-pgsql/pgsql
postgres:~$ psql -U icinga -d icinga < pgsql.sql
Setup trusted local icinga user
-------------------------------
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.
# vim /var/lib/pgsql/data/pg_hba.conf
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
#icinga
local icinga icinga trust
and reload the Postgresql server.
==========
= Upgrade
==========
There is no db upgrade script like in Debian, so you need to keep track of that yourself.
First, get the schema version
# mysql -u root -p icinga
mysql> SELECT * from icinga_dbversion;
+--------------+----------+---------+
| dbversion_id | name | version |
+--------------+----------+---------+
| 1 | idoutils | 1.6.0 |
+--------------+----------+---------+
1 row in set (0.01 sec)
and then decide, what to do - based on the official upgrade docs:
http://docs.icinga.org/latest/en/upgrading_idoutils.html
Remember - the upgrade steps need to be applied incremential, version by version.
e.g.
# cd /usr/share/doc/packages/icinga-idoutils-mysql/mysql/upgrade/
# mysql -u root -p icinga < mysql-upgrade-1.7.0.sql
===========
= Advanced
===========
Advanced guides and upgrade information can be found in the docs and wiki:
http://docs.icinga.org/latest/en/quickstart-idoutils.html
http://docs.icinga.org/latest/en/upgrading_idoutils.html