Would you like to learn how to do a Icinga2 installation on Ubuntu Linux? In this tutorial, we are going to show you how to install, configure and access Icinga2 on a computer running Ubuntu Linux.

• Ubuntu version: 18
• Ubuntu version: 19

Hardware List:

The following section presents the list of equipment used to create this Icinga2 tutorial.

Every piece of hardware listed above can be found at Amazon website.

Icinga2 Related Tutorial:

On this page, we offer quick access to a list of tutorials related to Icinga2 installation.

Tutorial Icinga2 - Installation on Ubuntu Linux

Install the required packages.

Copy to Clipboard

Download and install the Icinga2 repository key.

Copy to Clipboard

Use the following command to discover your Ubuntu linux code name.

Copy to Clipboard

In our example, the Ubuntu linux code is DISCO.

Add the oficial Icinga2 repository to you APT database.

Copy to Clipboard

Update your APT database and install the Icinga2 package.

Copy to Clipboard

Install the Icinga2's standard monitoring plugins.

Copy to Clipboard

List Icinga2 features instaled.

Copy to Clipboard

Enable the Icinga2 service to automatically start during boot time.

Copy to Clipboard

Congratulations! You have finished the Icinga2 installation.

Tutorial Icinga2 - MySQL Installation

Install the icinga2-ido-mysql package.

This will enable Icinga2 server to store the configuration in Mysql.

Copy to Clipboard

Enable the Icinga 2's ido-mysql feature.

icinga2-ido-mysql

Configure database for icinga2-ido-mysql with dbconfig-common? No.

configuring icinga2-ido-mysql

Enable the ido-mysql feature.

Copy to Clipboard

Restart Icinga2

Copy to Clipboard

Install the MySQL database service.

Copy to Clipboard

Access the MySQL database server.

Copy to Clipboard

Set a Password for the MySQL root user.

Copy to Clipboard

In our example, we set the root password kamisama123.

Create a database named icinga2.

Copy to Clipboard

Create a mysql user named icinga2.

Copy to Clipboard

Give the MySQL user named icinga2 permission over the database named icinga2.

Copy to Clipboard

Import the Icinga2 database template inside MySQL.

The system will request the password of the icinga2 MysQL user to import the template.

Copy to Clipboard

Edit the ido-mysql.conf configuration file to enable the communication with the MySQL service.

Copy to Clipboard

Here is our configuration.

Copy to Clipboard

Restart Icinga2

Copy to Clipboard

You have finished the database installation.

You have imported the Icinga2 database templates in the MySQL Server.

Tutorial - Installing the Icinga2 Web Interface

Next, we need to install the Apache web server and all the required software.

On the Linux console, use the following commands to install the required packages.

Copy to Clipboard

Locate the PHP configuration file on your system.

Edit the PHP configuration file and set the correct timezone.

Copy to Clipboard

Keep in mind that your PHP version and the location of the file may not be the same of mine.

As an example, our timezone was set to America/Sao_Paulo.

Copy to Clipboard

Restart the Apache service.

Copy to Clipboard

Access the MySQL database server.

Copy to Clipboard

Create a database named icingaweb_db.

Copy to Clipboard

Create a mysql user named icingaweb_db.

Copy to Clipboard

Give the MySQL user named icingaweb_db permission over the database named icingaweb_db.

Copy to Clipboard

Install the Icinga web interface package named icingaweb2.

Copy to Clipboard

Restart the Apache service.

Copy to Clipboard

Generate the Icinga installation token.

Copy to Clipboard

Open your browser and enter the IP address of your web server plus /icingaweb2.

In our example, the following URL was entered in the Browser:

• http://192.168.15.10/icingaweb2

The Icinga2 web installation interface should be presented.

Enter the Icinga web2 setup token.

icinga setup token

On the Icinga web modules screen, click on the Next button.

On the Icinga web requirements screen, click on the Next button.

icinga2 requirements

Select the Database option and click on the Next button.

icinga web authentication

On the Icinga Database Resource screen, perform the following configuration:

• Resource Name - icingaweb_db
• Database Type - MYSQL
• Host - localhost
• Port - 3306
• Database Name - icingaweb_db
• Username - icingaweb_db
• Password - kamisama123

Click on the Next button.

icincaweg2 configuration

On this screen, enter the MySQL root login to import the Icingaweb2 database template.

icingaweb2 create database

Set the Backend Name icingaweb2 and click on the Next button.

icinga2 authentication backend

Set an administrative account to access the Icinga web interface.

Application Configuration screen, perform the folowing configuration:

• Show Stacktraces - Enabled
• Show Application State Messages - Enabled
• User Preference Storage Type - Database
• Logging Type - Syslog
• Logging Level - Error
• Application Prefix - icingaweb2
• Facility - User

Click on the Next button.

Iicnga application configuration

On the Icinga installation summary screen, click on the Next button.

On the Welcome screen, click on the Next button.

icinga monitoring module

On the monitoring backend screen, perform the following configuration:

• Backend Name - icinga
• Backend Type - IDO

Click on the Next button.

icinga monitoring backend

On the Monitoring IDO Resource screen, perform the following configuration:
• Resource Name - icinga_ido
• Database Type - MYSQL
• Host - localhost
• Port - 3306
• Database name - icinga2
• Username - icinga2
• Password - kamisama123

Click on the Next button.

icinga monitoring ido

On the Command Transport screen, perform the following configuration:

• Transport name - icinga2
• Transport Type - Local Comand File
• Comand File - /var/run/icinga2/cmd/icinga2.cmd

Click on the Next button.

icinga command transport

On the Monitoring Security screen, perform the following configuration:

• Protected Custom Variables - *pw*,*pass*,community

Click on the Next button.

icinga monitoring security

On the last screen, click on the Finish button and wait for the Icinga2 installation to finish.

icinga web setup

After finishing the installation click on the option: Login to Icinga Web 2.

Finally, you will be presented with the Icinga2 login screen.

• Iicnga2 default username: You set before
• Icinga2 default Password: You set before

The Icinga2 login interface should be displayed.

icinga login

After a successful login, you will be sent to the Icinga2 Dashboard.

icinga2 dashboard

Congratulations, you have installed the Icinga2 web interface on Ubuntu Linux.