How to instal Icinga2 on Ubuntu 20.04 LTS Focal – Guide

Icinga is a free and open source data center monitoring tool. It is a computer system and network monitoring application that checks the availability of your network and computer resources, notifies system failures, generates performance data of your resources and provides highly available and distributed monitoring setup with the integrated cluster. feature. Icinga was developed in 2009 as a fork of the Nagios monitoring tool. Now it’s been rewritten from the ground up in C++ and has become one of the most popular monitoring tools on the web. The word “icinga” is a Zulu word meaning “search”, “search” or “investigate”. It can monitor network resources, notify outages and large complex environments, and generate performance data for reporting. Icinga is scalable and extensible. icinga features include monitoring SMTP, POP3, HTTP, NNTP, ping, CPU load, disk usage, switches, routers and more. The Icinga stack consists of Icinga2 – the monitoring server and Icinga Web 2 – the web interface for maintaining monitoring.

How to install Icinga2 on Ubuntu 20.04 LTS Focal

Install LAMP Stack

Icinga runs on a web server and is accessed from a browser. So the first step is to install the LAMP stack. LAMP is the acronym for Linux Apache MariaDB/MySQL and PHP. Apache is the web server, MariaDB is the database server, and PHP is the popular server-side scripting language. Let’s start. First update the package lists: To install the Apache web server, run the command: Once Apache is installed, enable it to start automatically at boot time. Then start the Apache daemon. To confirm that the web server is running, run: Moving on, we will install the MariaDB database server and client. When the installation is complete, enable MySQL to start on boot. Then start the MariaDB daemon. Again, check the MariaDB status To secure the database server, run the script Be sure to protect the database server with a root password. And answer ‘Yes’ to the remaining prompts to secure the database server. Moving on, we’ll install PHP, which is the remaining component of the LAMP stack. But first, install the dependencies shown. Then add the OndeJ repository which provides the latest version of PHP which is currently PHP 8.0. Icinga requires PHP 7.3 and later, so we are within the required version range. Once the repository is added, install PHP and the necessary dependencies for installing Icinga Then check the installed PHP version. Some modifications are necessary. Edit the php.ini file. Be sure to set the date.timezone parameter and set the cgi.fix_pathinfo parameter to 0. Save your changes and exit.

Add Icinga2 repository

The next step is to install Icinga2 on Ubuntu. However, as the Icinga repository is not hosted in the Ubuntu repository, we need to manually add the repository locally. First add Icinga’s GPG key Then create a repository file for Icinga in the /etc/apt/sources.list.d directory. Then add the following lines to define where Ubuntu will download Icinga from. Save and exit the configuration file.

Install Icinga2

First, update package lists and repositories first. Then install Icinga2 and monitoring plugins. Once installed, enable the Icinga monitoring tool. Then start the service. Then check the Icinga running status. Icinga is working as expected and this is a good sign that we are heading in the right direction.

Final note

I hope you like the guide How to instal Icinga2 on Ubuntu 20.04 LTS Focal. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.