How To Install Icinga on Ubuntu 20.04 LTS

Install Icinga on Ubuntu 20.04

In this tutorial, we will show you how to install Icinga on Ubuntu 20.04 LTS. For those of you who didn’t know, Icinga 2 is an open-source network monitoring system which checks the availability of your network resources, notifies users of outages, and generates performance data for reporting. It’s Scalable and extensible, Icinga2 can monitor large, complex environments across multiple locations.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you through the step by step installation Icinga 2 on an Ubuntu 20.04 Focal Fossa. You can follow the same instructions for Ubuntu 18.04, 16.04, and any other Debian based distribution like Linux Mint.

Install Icinga on Ubuntu 20.04 LTS Focal Fossa

Step 1. First, make sure that all your system packages are up-to-date by running these following apt commands in the terminal.

Step 2. Install LAMP stack.

An Ubuntu 20.04 LAMP server is required. If you do not have a LAMP installed, you can follow our guide here.

Step 3. Installing Icinga on Ubuntu 20.04.

Now we install the icinga2 packages and Nagios Monitoring plugins. First, add the GPG key of the Icinga2 to your system:

Next, create a new repository file ‘icinga-focal.list‘:

Add the following repository configuration:

Then, run an update of the package list and install Icinga packages:

Once the installation is completed, start the Icinga2 service and add it to the system boot:

Step 4. Configure the Database Server.

We will install the icinga2 module for the MySQL support named ‘icinga2-ido-mysql‘.

Next, to make the Icinga works with the new MySQL/MariaDB version, we will configure the MySQL user ‘icinga2’ with the MySQL native password authentication:

After that, change the authentication of user ‘icinga2@localhost’ with the native MySQL authentication plugin using the following query:

Next, enable the ‘ido-mysql‘ feature and check all enabled plugins:

Then restart Icinga for the changes to take effect:

Step 5. Installing the Icinga Web.

Icinga Web 2 is a powerful PHP framework that provides a web management interface for Icinga. Now we Install icingaweb2 and icingacli packages using the following command:

Next, generate the icingaweb2 token for the installation:

You’ll see the similar output:

Next, log in to the MySQL shell using the MySQL command below:

Create a new database and user using the following queries:

Step 6. Accessing Icinga 2 Web Interface.

Icinga2 will be available on HTTP port 80 by default. Open your favourite browser and navigate to or http://server-ip-address/icingaweb2/setup and complete the required steps to finish the installation. If you are using a firewall, please open port 80 to enable access to the control panel.

Install Icinga on Ubuntu 20.04

Congratulations! You have successfully installed Icinga. Thanks for using this tutorial for installing Icinga 2 on your Ubuntu 18.04 LTS system. For additional help or useful information, we recommend you to check the official Icinga website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!