{"id":5730,"date":"2020-05-03T15:23:08","date_gmt":"2020-05-03T12:23:08","guid":{"rendered":"https:\/\/kifarunix.com\/?p=5730"},"modified":"2024-03-14T20:43:03","modified_gmt":"2024-03-14T17:43:03","slug":"install-icinga-2-and-icinga-web-2-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-icinga-2-and-icinga-web-2-on-ubuntu-20-04\/","title":{"rendered":"Install Icinga 2 and Icinga Web 2 on Ubuntu 20.04"},"content":{"rendered":"\n<p>In this tutorial, we are going to learn how to install Icinga 2 and Icinga Web 2 on Ubuntu 20.04. <a rel=\"noreferrer noopener\" href=\"https:\/\/icinga.com\/docs\/icinga2\/latest\/doc\/01-about\/\" target=\"_blank\">Icinga 2<\/a> is a scalable and extensible opensource monitoring solution that checks the availability of various network resources including host metrics such as system uptime, load, memory, disk free space, running processes, network services such as HTTP, SMTP, SNMP, SSH, etc. Icinga supports notifications and can be configured to notify users of system\/service outages and generates performance data for reporting.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install-icinga-2-and-icinga-web-2-on-ubuntu-20-04\">Installing Icinga 2 and Icinga Web 2 on Ubuntu 20.04<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-icinga-2-on-ubuntu-20-04\">Install Icinga 2 on Ubuntu 20.04<\/h3>\n\n\n\n<p>Installing Icinga 2 from the official package repositories is a preferred way of installation. Fortunately, Ubuntu 20.04 repos provides Icinga 2 packages. However, the available package may not be up-to-date.<\/p>\n\n\n\n<p>To ensure you install the latest release version of Icinga, you need to install <a href=\"https:\/\/packages.icinga.com\/ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\">official Icinga 2 repositories<\/a> on Ubuntu 20.04 by running the commands below;<\/p>\n\n\n\n<p>Install Icinga Repository signing key;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -s https:\/\/packages.icinga.com\/icinga.key | gpg --dearmor -o \/usr\/share\/keyrings\/icinga-archive-keyring.gpg<\/code><\/pre>\n\n\n\n<p>Next, install Icinga Package repository on Ubuntu 20.04;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo 'deb &#91;signed-by=\/usr\/share\/keyrings\/icinga-archive-keyring.gpg] https:\/\/packages.icinga.com\/ubuntu icinga-focal main\ndeb-src &#91;signed-by=\/usr\/share\/keyrings\/icinga-archive-keyring.gpg] https:\/\/packages.icinga.com\/ubuntu icinga-focal main' &gt; \/etc\/apt\/sources.list.d\/icinga.list<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"run-system-update\">Run system update<\/h3>\n\n\n\n<p>Run the command below to update your system packages.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update<\/code><\/pre>\n\n\n\n<p>Thus, to install Icinga 2 from Ubuntu 20.04 repos<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install icinga2<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"enable-icinga-2-main-features\">Enable Icinga 2 Main Features<\/h3>\n\n\n\n<p>During the installation, there are three main features of Icinga 2 that are enabled. These are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>checker<\/code>&nbsp;for executing checks<\/li>\n\n\n\n<li><code>notification<\/code>&nbsp;for sending notifications<\/li>\n\n\n\n<li><code>mainlog<\/code>&nbsp;for writing the&nbsp;<code>icinga2.log<\/code>&nbsp;file<\/li>\n<\/ul>\n\n\n\n<p>For the enablement to take effect, Icinga 2 service has to be restarted (Icinga 2 is started and enabled during installation);<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart icinga2<\/code><\/pre>\n\n\n\n<p>To check the status of Icinga 2;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status icinga2<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\u25cf icinga2.service - Icinga host\/service\/network monitoring system\n     Loaded: loaded (\/lib\/systemd\/system\/icinga2.service; enabled; vendor preset: enabled)\n    Drop-In: \/etc\/systemd\/system\/icinga2.service.d\n             \u2514\u2500limits.conf\n     Active: active (running) since Thu 2022-02-17 10:14:57 UTC; 6s ago\n    Process: 5461 ExecStartPre=\/usr\/lib\/icinga2\/prepare-dirs \/etc\/default\/icinga2 (code=exited, status=0\/SUCCESS)\n   Main PID: 5466 (icinga2)\n     Status: \"Startup finished.\"\n      Tasks: 13\n     Memory: 12.8M\n     CGroup: \/system.slice\/icinga2.service\n             \u251c\u25005466 \/usr\/lib\/x86_64-linux-gnu\/icinga2\/sbin\/icinga2 --no-stack-rlimit daemon --close-stdio -e \/var\/log\/icinga2\/error.log\n             \u251c\u25005502 \/usr\/lib\/x86_64-linux-gnu\/icinga2\/sbin\/icinga2 --no-stack-rlimit daemon --close-stdio -e \/var\/log\/icinga2\/error.log\n             \u2514\u25005507 \/usr\/lib\/x86_64-linux-gnu\/icinga2\/sbin\/icinga2 --no-stack-rlimit daemon --close-stdio -e \/var\/log\/icinga2\/error.log\n\nFeb 17 10:14:57 ubuntu20 icinga2[5502]: [2022-02-17 10:14:57 +0000] information\/ConfigItem: Instantiated 1 NotificationComponent.\nFeb 17 10:14:57 ubuntu20 icinga2[5502]: [2022-02-17 10:14:57 +0000] information\/ConfigItem: Instantiated 1 UserGroup.\nFeb 17 10:14:57 ubuntu20 icinga2[5502]: [2022-02-17 10:14:57 +0000] information\/ConfigItem: Instantiated 1 User.\nFeb 17 10:14:57 ubuntu20 icinga2[5502]: [2022-02-17 10:14:57 +0000] information\/ConfigItem: Instantiated 3 TimePeriods.\nFeb 17 10:14:57 ubuntu20 icinga2[5502]: [2022-02-17 10:14:57 +0000] information\/ConfigItem: Instantiated 3 ServiceGroups.\nFeb 17 10:14:57 ubuntu20 icinga2[5502]: [2022-02-17 10:14:57 +0000] information\/ConfigItem: Instantiated 1 ScheduledDowntime.\nFeb 17 10:14:57 ubuntu20 icinga2[5502]: [2022-02-17 10:14:57 +0000] information\/ConfigItem: Instantiated 12 Services.\nFeb 17 10:14:57 ubuntu20 icinga2[5502]: [2022-02-17 10:14:57 +0000] information\/ScriptGlobal: Dumping variables to file '\/var\/cache\/icinga2\/icinga2.vars'\nFeb 17 10:14:57 ubuntu20 icinga2[5466]: [2022-02-17 10:14:57 +0000] information\/cli: Closing console log.\nFeb 17 10:14:57 ubuntu20 systemd[1]: Started Icinga host\/service\/network monitoring system.\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-icinga-2-monitoring-plugins-on-ubuntu-20-04\">Install Icinga 2 Monitoring Plugins on Ubuntu 20.04<\/h3>\n\n\n\n<p>Monitoring of external services can only be possible through the use of monitoring plugins. Therefore, run the command below to install Icinga 2 monitoring plugins.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install monitoring-plugins<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-and-configure-icinga-2-backend-database\">Install and Configure Icinga 2 Backend Database<\/h3>\n\n\n\n<p>Icinga 2 Database Icinga Data Output (DB IDO) exports all configuration and status information into a database which can either by MySQL\/MariaDB or PostgreSQL. In this tutorial, we are using MySQL 8 which is the default version available on Ubuntu repos.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"install-mysql-database\">Install MySQL Database<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install mysql-server<\/code><\/pre>\n\n\n\n<p>Once the installation is done, run the MySQL initial security script to remove test databases, anonymous users, disallow remote root login&#8230;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql_secure_installation<\/code><\/pre>\n\n\n\n<p>Install Icinga Data Output modules for MySQL.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install icinga2-ido-mysql<\/code><\/pre>\n\n\n\n<p>When prompted, enable Icinga 2 to use MySQL as the backend database.<\/p>\n\n\n\n<p>If not enabled, this feature can be enabled later by running the command;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>icinga2 feature enable ido-mysql<\/code><\/pre>\n\n\n\n<p>To list enabled features, run the command;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>icinga2 feature list<\/code><\/pre>\n\n\n\n<p>Next, choose whether you want to use the automated setup wizard to configure <strong><code>icinga2-ido-mysql<\/code><\/strong>. We chose to go the manual way by selecting <strong>No<\/strong>&nbsp;in this tutorial.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"create-mysql-database-for-icinga-2\">Create MySQL Database for Icinga 2<\/h4>\n\n\n\n<p>To create the Icinga 2 database, login as root user;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p<\/code><\/pre>\n\n\n\n<p>Then create the database. Note, names used here are not standard, use any name you like;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>create database icinga2db;<\/code><\/pre>\n\n\n\n<p>Create the database user and grant all the privileges on Icinga 2 database created above.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>create user icingaadmin@localhost identified with mysql_native_password by 'myP@ssW0rd';<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>grant all on icinga2db.* to icingaadmin@localhost;<\/code><\/pre>\n\n\n\n<p>Reload privileges tables and exit the database.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>flush privileges;\nquit<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"import-the-icinga-2-ido-schema\">Import the Icinga 2 IDO schema<\/h4>\n\n\n\n<p>Next, import Icinga 2 IDO schema into Icinga 2 database created above. Replace the database name accordingly.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p <strong>icinga2db<\/strong> &lt; \/usr\/share\/icinga2-ido-mysql\/schema\/mysql.sql<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"configure-icinga-2-database-connection-settings\">Configure Icinga 2 Database Connection Settings<\/h4>\n\n\n\n<p>Open the Icinga 2 MySQL IDO configuration file to define the Icinga 2 database connection settings;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim \/etc\/icinga2\/features-available\/ido-mysql.conf<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\/**\n * The db_ido_mysql library implements IDO functionality\n * for MySQL.\n *\/\n\nlibrary \"db_ido_mysql\"\n\nobject IdoMysqlConnection \"ido-mysql\" {\n  user = \"<strong>icingaadmin<\/strong>\",\n  password = \"<strong>myP@ssW0rd<\/strong>\",\n  host = \"localhost\",\n  database = \"<strong>icinga2db<\/strong>\"\n}\n<\/code><\/pre>\n\n\n\n<p>Save and exit the file<\/p>\n\n\n\n<p>Setup the&nbsp;<a href=\"https:\/\/icinga.com\/docs\/icinga2\/latest\/doc\/12-icinga2-api\/\" target=\"_blank\" rel=\"noreferrer noopener\">Icinga 2 API<\/a>&nbsp;for transmitting external commands;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>icinga2 api setup<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>information\/cli: Generating new CA.\ninformation\/base: Writing private key to '\/var\/lib\/icinga2\/ca\/\/ca.key'.\ninformation\/base: Writing X509 certificate to '\/var\/lib\/icinga2\/ca\/\/ca.crt'.\ninformation\/cli: Generating new CSR in '\/var\/lib\/icinga2\/certs\/\/ubuntu20.csr'.\ninformation\/base: Writing private key to '\/var\/lib\/icinga2\/certs\/\/ubuntu20.key'.\ninformation\/base: Writing certificate signing request to '\/var\/lib\/icinga2\/certs\/\/ubuntu20.csr'.\ninformation\/cli: Signing CSR with CA and writing certificate to '\/var\/lib\/icinga2\/certs\/\/ubuntu20.crt'.\ninformation\/pki: Writing certificate to file '\/var\/lib\/icinga2\/certs\/\/ubuntu20.crt'.\ninformation\/cli: Copying CA certificate to '\/var\/lib\/icinga2\/certs\/\/ca.crt'.\ninformation\/cli: Adding new ApiUser 'root' in '\/etc\/icinga2\/conf.d\/api-users.conf'.\ninformation\/cli: Reading '\/etc\/icinga2\/icinga2.conf'.\ninformation\/cli: Enabling the 'api' feature.\nEnabling feature api. Make sure to restart Icinga 2 for these changes to take effect.\ninformation\/cli: Updating 'NodeName' constant in '\/etc\/icinga2\/constants.conf'.\ninformation\/cli: Created backup file '\/etc\/icinga2\/constants.conf.orig'.\ninformation\/cli: Updating 'ZoneName' constant in '\/etc\/icinga2\/constants.conf'.\ninformation\/cli: Backup file '\/etc\/icinga2\/constants.conf.orig' already exists. Skipping backup.\nDone.\n\nNow restart your Icinga 2 daemon to finish the installation!\n\n<\/code><\/pre>\n\n\n\n<p>Update the API username and password in the file, <strong><code>\/etc\/icinga2\/conf.d\/api-users.conf<\/code><\/strong>.<\/p>\n\n\n\n<p>Comment the existing lines and the following configs. Be sure to <strong>change<\/strong> the password. <strong>THIS PASSWORD WILL BE REQUIRED WHEN SETTING THE COMMAND TRANSPORT<\/strong>.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>\/**\n * The ApiUser objects are used for authentication against the API.\n *\/\n\/\/ object ApiUser \"root\" {\n\/\/  password = \"8e84357da29fbb32\"\n\/\/  \/\/ client_cn = \"\"\n\/\/\n\/\/  permissions = [ \"*\" ]\n\/\/}\n<strong>object ApiUser \"icingaweb2\" {\n  password = \"StroNgP@ssw0rd\"\n  permissions = [ \"status\/query\", \"actions\/*\", \"objects\/modify\/*\", \"objects\/query\/*\" ]\n}<\/strong>\n<\/code><\/pre>\n\n\n\n<p>Save and exit the file.<\/p>\n\n\n\n<p>Restart Icinga 2 daemon<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart icinga2<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-icinga-web-2-on-ubuntu-20-04\">Install Icinga Web 2 on Ubuntu 20.04<\/h3>\n\n\n\n<p>Icinga Web 2 is a powerful PHP framework that provides web management interface for Icinga 2. Install PHP and required modules.<\/p>\n\n\n\n<p>Note, PHP 7.4 is the default version on Ubuntu 20.04.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install apache2 php php-{cli,curl,gd,ldap,json,intl,imagick,curl,intl,mbstring,xml,mysql} openssl<\/code><\/pre>\n\n\n\n<p>Next, install Icinga 2 web and CLI management packages.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install icingaweb2 icingacli<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"create-icinga-web-2-database\">Create Icinga Web 2 Database<\/h4>\n\n\n\n<p>Again, login to MySQL database and create a database and database user for Icinga 2 web.<\/p>\n\n\n\n<p>To create the Icinga 2 database, login as root user;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>create database icinga2webdb;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>create user icinga2web@localhost identified with mysql_native_password by 'mywebP@ssW0rd';<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>grant all on icinga2webdb.* to icinga2web@localhost;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>flush privileges;\nquit<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"preparing-web-setup\">Prepare Icinga 2 Web Setup<\/h4>\n\n\n\n<p>Generate Icinga Web 2 authentication tokens;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>icingacli setup token create<\/code><\/pre>\n\n\n\n<p>This will generate such a token as:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>The newly generated setup token is: <strong><strong>99b7614f6f1bf89e<\/strong><\/strong><\/code><\/pre>\n\n\n\n<p>You can as well display the token using the command;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>icingacli setup token show<\/code><\/pre>\n\n\n\n<p>Ensure that a <code>icingaweb2<\/code> system group exists and that the web server user,&nbsp;<code><strong>www-data<\/strong>,<\/code> is a member of the group.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>getent group icingaweb2<\/code><\/pre>\n\n\n\n<p>Sample output<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>icingaweb2:x:120:www-data<\/code><\/pre>\n\n\n\n<p>Verify the group membership<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>groups www-data<\/code><\/pre>\n\n\n\n<p>Sample output<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>www-data : www-data <strong>icingaweb2<\/strong><\/code><\/pre>\n\n\n\n<p>Restart Apache web server.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart apache2<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"finalize-icinga-2-web-setup-on-browser\">Finalize Icinga 2 Web Setup on Browser<\/h4>\n\n\n\n<p>To finalize the setup on browser, access Icinga 2 web using the address <strong>http:\/\/&lt;icinga-server-IP-or-hostname&gt;\/icingaweb2\/setup<\/strong>.<\/p>\n\n\n\n<p>Enter your authentication token generated and click next to proceed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1309\" height=\"634\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/icinga-token-1.png\" alt=\"\" class=\"wp-image-11608\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/icinga-token-1.png?v=1645107777 1309w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/icinga-token-1-768x372.png?v=1645107777 768w\" sizes=\"(max-width: 1309px) 100vw, 1309px\" \/><\/figure>\n\n\n\n<p>Choose Icinga 2 modules to enable. In this tutorial, we go with the defaults with monitoring modules only enabled.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1305\" height=\"395\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/enable-modules-1.png\" alt=\"\" class=\"wp-image-11609\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/enable-modules-1.png?v=1645107823 1305w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/enable-modules-1-768x232.png?v=1645107823 768w\" sizes=\"(max-width: 1305px) 100vw, 1305px\" \/><\/figure>\n\n\n\n<p>On the next page, the setup wizards verifies if all the required PHP modules are in place.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1306\" height=\"586\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/php-modules.png\" alt=\"\" class=\"wp-image-11610\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/php-modules.png?v=1645107862 1306w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/php-modules-768x345.png?v=1645107862 768w\" sizes=\"(max-width: 1306px) 100vw, 1306px\" \/><\/figure>\n\n\n\n<p>If all is well, click Next to proceed, otherwise install any missing PHP extensions and proceed with setup.<\/p>\n\n\n\n<p>Choose the mode of authentication. We use database authentication in this demo.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1311\" height=\"307\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/authentication-1.png\" alt=\"Install Icinga 2 and Icinga Web 2 on Ubuntu 20.04\" class=\"wp-image-11611\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/authentication-1.png?v=1645107887 1311w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/authentication-1-768x180.png?v=1645107887 768w\" sizes=\"(max-width: 1311px) 100vw, 1311px\" \/><\/figure>\n\n\n\n<p>Configure<strong> Icinga 2 Web database<\/strong> connection settings. Click Validate Configuration to test connection to database.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1289\" height=\"653\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icingaweb2-db.png\" alt=\"\" class=\"wp-image-11612\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icingaweb2-db.png?v=1645107915 1289w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icingaweb2-db-768x389.png?v=1645107915 768w\" sizes=\"(max-width: 1289px) 100vw, 1289px\" \/><\/figure>\n\n\n\n<p>Choose authentication backend database.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1304\" height=\"253\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/auth-backend.png\" alt=\"\" class=\"wp-image-11613\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/auth-backend.png?v=1645107947 1304w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/auth-backend-768x149.png?v=1645107947 768w\" sizes=\"(max-width: 1304px) 100vw, 1304px\" \/><\/figure>\n\n\n\n<p>Create Icinga Web 2 administrative user.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1309\" height=\"363\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/web-administrative.png\" alt=\"\" class=\"wp-image-11614\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/web-administrative.png?v=1645107969 1309w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/web-administrative-768x213.png?v=1645107969 768w\" sizes=\"(max-width: 1309px) 100vw, 1309px\" \/><\/figure>\n\n\n\n<p>Choose your application configuration settings.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1309\" height=\"583\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icinga2web-application.png\" alt=\"\" class=\"wp-image-11615\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icinga2web-application.png?v=1645107993 1309w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icinga2web-application-768x342.png?v=1645107993 768w\" sizes=\"(max-width: 1309px) 100vw, 1309px\" \/><\/figure>\n\n\n\n<p>Icinga Web 2 application configuration summary.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1313\" height=\"411\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/conf-summary.png\" alt=\"\" class=\"wp-image-11616\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/conf-summary.png?v=1645108011 1313w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/conf-summary-768x240.png?v=1645108011 768w\" sizes=\"(max-width: 1313px) 100vw, 1313px\" \/><\/figure>\n\n\n\n<p>Click Next,Next to proceed. Configure Icinga Web 2 monitoring module.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1321\" height=\"329\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/mon-modules.png\" alt=\"\" class=\"wp-image-11617\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/mon-modules.png?v=1645108026 1321w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/mon-modules-768x191.png?v=1645108026 768w\" sizes=\"(max-width: 1321px) 100vw, 1321px\" \/><\/figure>\n\n\n\n<p>Configure Icinga 2 Database connection settings.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1085\" height=\"608\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icinga2-db.png\" alt=\"\" class=\"wp-image-11618\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icinga2-db.png?v=1645108046 1085w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icinga2-db-768x430.png?v=1645108046 768w\" sizes=\"(max-width: 1085px) 100vw, 1085px\" \/><\/figure>\n\n\n\n<p>If upon validating the configuration you get the error, <code><strong>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.<\/strong><\/code>, it simply means ido-mysql feature is not enabled. Enable it and restart Icinga 2.<\/p>\n\n\n\n<p>Configure Icinga Transport commands. Read more on&nbsp;<a href=\"https:\/\/icinga.com\/docs\/icingaweb2\/latest\/modules\/monitoring\/doc\/05-Command-Transports\/\" target=\"_blank\" rel=\"noreferrer noopener\">Icinga web 2 command transport<\/a>. Provide the API credentials set before.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1857\" height=\"773\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icingaweb2-api.png\" alt=\"\" class=\"wp-image-11623\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icingaweb2-api.png?v=1645111710 1857w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icingaweb2-api-768x320.png?v=1645111710 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icingaweb2-api-1536x639.png?v=1645111710 1536w\" sizes=\"(max-width: 1857px) 100vw, 1857px\" \/><\/figure>\n\n\n\n<p>Configure your <a rel=\"noreferrer noopener\" href=\"https:\/\/icinga.com\/docs\/icingaweb2\/latest\/modules\/monitoring\/doc\/10-Restrict-Custom-Variables\/\" target=\"_blank\">protected Custom Variables<\/a> and click next then finish Icinga web 2 setup.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1314\" height=\"256\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icinga-mon-security.png\" alt=\"\" class=\"wp-image-11620\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icinga-mon-security.png?v=1645108209 1314w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icinga-mon-security-768x150.png?v=1645108209 768w\" sizes=\"(max-width: 1314px) 100vw, 1314px\" \/><\/figure>\n\n\n\n<p>Check the summary and click Finish the setup.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1872\" height=\"717\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icinga-web-summary.png\" alt=\"\" class=\"wp-image-11624\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icinga-web-summary.png?v=1645111845 1872w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icinga-web-summary-768x294.png?v=1645111845 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icinga-web-summary-1536x588.png?v=1645111845 1536w\" sizes=\"(max-width: 1872px) 100vw, 1872px\" \/><\/figure>\n\n\n\n<p>Icinga Web 2 is now setup. Click <code>Login to Icinga Web 2<\/code> and login using the admin credentials created during the installation.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1813\" height=\"921\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icinga2-web-login.png\" alt=\"\" class=\"wp-image-11625\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icinga2-web-login.png?v=1645112024 1813w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icinga2-web-login-768x390.png?v=1645112024 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icinga2-web-login-1536x780.png?v=1645112024 1536w\" sizes=\"(max-width: 1813px) 100vw, 1813px\" \/><\/figure><\/div>\n\n\n<p>Icinga 2 monitoring dashboard.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1363\" height=\"518\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icinga2-dashboard.png\" alt=\"\" class=\"wp-image-11622\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icinga2-dashboard.png?v=1645108292 1363w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/icinga2-dashboard-768x292.png?v=1645108292 768w\" sizes=\"(max-width: 1363px) 100vw, 1363px\" \/><\/figure>\n\n\n\n<p>Magnificent!!<\/p>\n\n\n\n<p>You can now add your hosts for monitoring.<\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/kifarunix.com\/how-to-monitor-hosts-and-services-with-icinga-2-on-ubuntu-18-04\/\" target=\"_blank\">How to Monitor Remote Linux Hosts and Services with Icinga 2<\/a><\/p>\n\n\n\n<p>Read more on <a rel=\"noreferrer noopener\" href=\"https:\/\/icinga.com\/docs\/icinga2\/latest\/\" target=\"_blank\">Icinga 2 documentation page<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"related-tutorials\">Related Tutorials<\/h3>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-and-setup-nagios-core-on-ubuntu-20-04\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install and Setup Nagios Core on Ubuntu 20.04<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-icinga-2-on-debian-10-buster\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Icinga 2 on Debian 10 Buster<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-install-icinga-2-and-icinga-web-2-on-ubuntu-18-04-lts\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Install Icinga 2 and Icinga Web 2 on Ubuntu 18.04 LTS<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/kifarunix.com\/install-nagios-core-on-debian-10-buster\/\" target=\"_blank\">Install Nagios Core on Debian 10 Buster<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/kifarunix.com\/install-zabbix-4-x-from-sources-on-debian-10-buster\/\" target=\"_blank\">Install Zabbix 4.x from Sources on Debian 10 Buster<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we are going to learn how to install Icinga 2 and Icinga Web 2 on Ubuntu 20.04. Icinga 2 is a scalable<\/p>\n","protected":false},"author":1,"featured_media":11626,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,179,72],"tags":[1566,181,1563,1565,1564,1200],"class_list":["post-5730","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-icinga","category-monitoring","tag-icinga-2","tag-icinga-web-2","tag-install-icinga-2-on-ubuntu-20-04","tag-install-icinga-ubuntu-20-04","tag-install-icinga-web-2-on-ubuntu-20-04","tag-ubuntu-20-04","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/5730"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=5730"}],"version-history":[{"count":7,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/5730\/revisions"}],"predecessor-version":[{"id":21402,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/5730\/revisions\/21402"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/11626"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=5730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=5730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=5730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}