Using MariaDB with Icinga 1x

Installing From Scratch

When you do an install from scratch and following the icinga documentation for installing IDOUtils the only changes necessary are:

Add the MariaDB repo to yum, /etc/yum.repos.d/MariaDB.repo. In this case I am using Cent6_64bit and Maria 5.5. For other choices go here.

# MariaDB 5.5 CentOS repository list - created 2013-10-14 21:01 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Now install MariaDB

yum install MariaDB-server MariaDB-client

The rest of the steps are the same for both Icinga and Icinga-Web

Migrating from MySQL to MariaDB

Make sure you back up your database by doing a proper dump, as you will need to reinstall the schema’s and any data.

Stop services

service mysql stop
service icinga stop
service ido2db stop

Uninstall mysql

yum list | grep mysql
yum remove xxx

You don’t need to uninstall everything as much of it will be reinstalled later. The bare minimum would be mysql-server. This will also uninstall the following:

  • icinga-idoutils-libdbi-mysql
  • nagios-plugins

Install MariaDB

yum install Mariadb-server

Install IDOUtils

yum install icinga-idoutils icinga-idoutils-libdbi-mysql

Recreate the database according to the icinga documentation. This will also need to be done for Icinga-Web as well.

Restart the services

service mysql start
service icinga start
service ido2db start

You should be all set to log in.