icinga2/doc/2.1.4-setting-up-ido.md

55 lines
1.7 KiB
Markdown
Raw Normal View History

2013-09-27 13:56:11 +02:00
### Configuring IDO
The IDO (Icinga Data Output) modules for Icinga 2 takes care of exporting all
2013-10-01 12:59:02 +02:00
configuration and status information into a database. The IDO database is used
by a number of projects including Icinga Web.
2013-09-27 13:56:11 +02:00
There is a separate module for each database backend. At present only support
for MySQL is implemented.
#### Setting up the database
2013-10-01 12:59:02 +02:00
First of all you have to create a database for Icinga 2:
2013-09-30 09:04:49 +02:00
2013-09-27 13:56:11 +02:00
# 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, INDEX, EXECUTE
ON icinga.* TO 'icinga'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> quit
2013-09-30 09:04:49 +02:00
After creating the database you can import the Icinga 2 IDO schema using the
2013-10-01 12:59:02 +02:00
following command:
2013-09-30 09:04:49 +02:00
2013-10-01 12:59:02 +02:00
# mysql -u root -p icinga < /path/to/icinga-src/components/db_ido_mysql/schema/mysql.sql
2013-09-27 13:56:11 +02:00
#### Installing the IDO module
2013-10-01 12:59:02 +02:00
Once you've set up your database you have to install the *icinga2-ido-mysql*
2013-09-27 13:56:11 +02:00
package using your distribution's package manager.
The package provides a new configuration file that is installed in
*/etc/icinga2/features-available/ido-mysql.conf*. You will need to update the
database credentials in this file.
You can enable the ido-mysql feature configuration file using *i2enfeature*:
# i2enfeature ido-mysql
Module 'ido-mysql' was enabled.
Make sure to restart Icinga 2 for these changes to take effect.
2013-10-01 12:59:02 +02:00
After enabling the ido-mysql feature you have to restart Icinga 2:
2013-09-27 13:56:11 +02:00
2013-10-01 12:59:02 +02:00
# /etc/init.d/icinga2 restart