Install Icinga 2 and Icinga web 2 on Ubuntu 17.10 server
Sponsored Link
Icinga Web 2 is a powerful PHP framework for web applications that comes in a clean and reduced design. It’s fast, responsive, accessible and
easily extensible with modules.
Preparing your system
Before installing Icinga 2 you need to make sure you have installed Ubuntu 17.10 LAMP server.
Install Icinga 2 on ubuntu 17.10
From the terminal run the following command
sudo apt-get install icinga2 icinga2-ido-mysql
This will install the main Icinga software, along with a database driver that enables Icinga to put historical data and other information into a MySQL database.
You will be presented with the following questions
Enable Icinga 2's ido-mysql feature? YES
Configure database for icinga2-ido-mysql with dbconfig-common? YES
You'll then be prompted to set up an Icinga database password. Create a strong password and record it for later. We'll need it when setting up
the web interface.
Now you need to enable icinga2 mysql feature using the following commands
sudo icinga2 feature enable ido-mysql
sudo icinga2 feature enable command
sudo systemctl restart icinga2
If you don't do the above steps you will be presented with the following error
There is currently no icinga instance writing to the IDO. Make sure that a icinga instance is configured and able to write to the IDO
Check the status of icinga2 using the following command
sudo systemctl status icinga2
Installing the Icinga2 Web Interface
Run the following command to install Icinga2 Web Interface
sudo apt-get install icingaweb2
Now you need to edit the /etc/php/7.1/apache2/php.ini file to enter the timezone
sudo nano /etc/php/7.1/apache2/php.ini
Add the time zone
date.timezone = Europe/London
Save and exit the file and restart the apache2 server using the following command
sudo systemctl restart apache2
Setting up the Icinga2 Web Interface
We need to configure the Icinga2 Web Interface using the web-based process before starting this we need to create setup token using the following command
sudo icingacli setup token create
You need to start the web interface using the following link
http://serverip/icingaweb2/setup
Setting up the Token
Enter the token created previously and click next
Selecting the Icinga Web2 Modules
Enabling the Monitoring module and Click Next to continue
Verifying the PHP settings
Authenticating Method select as database
Enter the Database details
Creating Icinga2 Web administration logins
Choosing the Application configuration options
Review all the selected settings
Configuring Monitoring Module
Review monitoring module configuration options
Icinga2 Login Interface
Once you login you should see similar to the following screen
After completing the installation check the icinga2 documentation for hosts monitoring setup.