Icinga

Install Icinga Director On CentOS 7

Install Icinga Director
Install Icinga Director

Install Icinga Director

We have seen how to install Icinga 2 and Icinga Web 2 in the previous article. In this session, we will discuss how to install Icinga director. Icinga director is an Icinga module that makes Icinga configuration easier. With this, we can add, delete and modify hosts, checks, and more.

Icinga director Installation

There are some dependency modules for the Icinga director. To install Icinga director the following modules should be enabled:

Reactbundle
ipl
incubator

Install Reactbundle and ipl

If you’re on Icinga Web 2 v2.9.0 or higher, these modules are not required anymore unless you’re running the Director in version 1.8.0 or lower. Director v1.8.1 also doesn’t need this module.

In the previous post, we installed Icinga Web 2 v2.10.1 and going to install Icinga Director v1.9.1, so we don’t need Reactbundle and ipl module. But for those who are running old versions of Icinga Web 2, I am explaining the installation here:

Install Reactbundle
MODULE_NAME=reactbundle
MODULE_VERSION=v0.9.0
REPO="https://github.com/Icinga/icingaweb2-module-${MODULE_NAME}"
MODULES_PATH="/usr/share/icingaweb2/modules"
git clone ${REPO} "${MODULES_PATH}/${MODULE_NAME}" --branch "${MODULE_VERSION}"
icingacli module enable "${MODULE_NAME}"
Install ipl
MODULE_NAME=ipl
MODULE_VERSION=v0.5.0
REPO="https://github.com/Icinga/icingaweb2-module-${MODULE_NAME}"
MODULES_PATH="/usr/share/icingaweb2/modules"
git clone ${REPO} "${MODULES_PATH}/${MODULE_NAME}" --branch "${MODULE_VERSION}"
icingacli module enable "${MODULE_NAME}"

Install incubator

Incubator provides libraries useful for Icinga Web 2 modules.

MODULE_NAME=incubator
MODULE_VERSION=v0.17.0
REPO="https://github.com/Icinga/icingaweb2-module-${MODULE_NAME}"
MODULES_PATH="/usr/share/icingaweb2/modules"
git clone ${REPO} "${MODULES_PATH}/${MODULE_NAME}" --branch "${MODULE_VERSION}"
icingacli module enable "${MODULE_NAME}"

Install Icinga Director Module

Create a database for Icinga Director. Give the desired password for the database user director in the section “some-password

mysql -u root -p -e "CREATE DATABASE director CHARACTER SET 'utf8';
CREATE USER director@localhost IDENTIFIED BY 'some-password';
GRANT ALL ON director.* TO director@localhost;"

Once the database is created, Install Icinga Director module:

MODULE_VERSION="1.9.1"
ICINGAWEB_MODULEPATH="/usr/share/icingaweb2/modules"
REPO_URL="https://github.com/icinga/icingaweb2-module-director"
TARGET_DIR="${ICINGAWEB_MODULEPATH}/director"
git clone "${REPO_URL}" "${TARGET_DIR}" --branch v${MODULE_VERSION}
Load the schema for the director database
mysql -u root -p director < /usr/share/icingaweb2/modules/director/schema/mysql.sql
Enable Director module
icingacli module enable director

Create a new resource for Director

Login to Icinga Web and Go to Configuration -> Application -> Resources.

Install Icinga Director

Add new resource there and give Resource Name, Database Name, Username, Password and Character Set. Then click on Validate Configuration. After the successful validation click on Save.

Create a service for Icinga Director
useradd -r -g icingaweb2 -d /var/lib/icingadirector -s /bin/false icingadirector
install -d -o icingadirector -g icingaweb2 -m 0750 /var/lib/icingadirector
cp "${TARGET_DIR}/contrib/systemd/icinga-director.service" /etc/systemd/system/
Enable and start the service
systemctl daemon-reload
systemctl enable icinga-director.service
systemctl start icinga-director.service

Now you can see the activity log in the Icinga director menu.

Then Go to Icinga Director, and complete the setup there:

Icinga Director Setup

Once you give Run Import, you can see the changes in the Activity log. Please go to Activity log and Click on “Deploy xxx pending changes“. It will import all existing configurations to the Icinga Director.

That’s it!

Also Read:

If you like this post and wish to receive more articles from us, please like our FB page: Grepitout

Your suggestions and feedback will encourage us and help us to improve further, please feel free to write your comments.

For more details on our services, please drop us an e-mail at info@grepitout.com

Add Comment

Click here to post a comment

Topics