{"id":1412,"date":"2019-03-30T05:43:19","date_gmt":"2019-03-30T00:13:19","guid":{"rendered":"http:\/\/www.webhostingchennai.co.in\/blog\/?p=1412"},"modified":"2019-03-30T05:43:19","modified_gmt":"2019-03-30T00:13:19","slug":"installing-icinga-web-2-on-centos7","status":"publish","type":"post","link":"https:\/\/bestunixhosting.in\/blog\/installing-icinga-web-2-on-centos7\/","title":{"rendered":"Installing Icinga web 2 on CentOS7 \/ RHEL 7"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_69_1 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/bestunixhosting.in\/blog\/installing-icinga-web-2-on-centos7\/#Installing_Icinga_web_2_on_CentOS7_RHEL_7\" title=\"Installing Icinga web 2 on CentOS7 \/ RHEL 7\">Installing Icinga web 2 on CentOS7 \/ RHEL 7<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/bestunixhosting.in\/blog\/installing-icinga-web-2-on-centos7\/#Prerequisites\" title=\"Prerequisites\">Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/bestunixhosting.in\/blog\/installing-icinga-web-2-on-centos7\/#Installing_PHP_and_PHP_Extensions\" title=\"Installing PHP and PHP Extensions\">Installing PHP and PHP Extensions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/bestunixhosting.in\/blog\/installing-icinga-web-2-on-centos7\/#Adding_Icinga_2_Repository\" title=\"Adding Icinga 2 Repository\">Adding Icinga 2 Repository<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/bestunixhosting.in\/blog\/installing-icinga-web-2-on-centos7\/#Installing_Icinga_Web_2\" title=\"Installing Icinga Web 2\">Installing Icinga Web 2<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/bestunixhosting.in\/blog\/installing-icinga-web-2-on-centos7\/#SELinux\" title=\"SELinux\">SELinux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/bestunixhosting.in\/blog\/installing-icinga-web-2-on-centos7\/#Firewall\" title=\"Firewall\">Firewall<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/bestunixhosting.in\/blog\/installing-icinga-web-2-on-centos7\/#Preparing_Icinga_Web_2_Setup\" title=\"Preparing Icinga Web 2 Setup\">Preparing Icinga Web 2 Setup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/bestunixhosting.in\/blog\/installing-icinga-web-2-on-centos7\/#Icinga_Web_2_Setup_Wizard\" title=\"Icinga Web 2 Setup Wizard\">Icinga Web 2 Setup Wizard<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/bestunixhosting.in\/blog\/installing-icinga-web-2-on-centos7\/#Install_IDO_modules_for_MySQL\" title=\"Install IDO modules for MySQL\">Install IDO modules for MySQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/bestunixhosting.in\/blog\/installing-icinga-web-2-on-centos7\/#Install_Nagios_Plugins\" title=\"Install Nagios Plugins\">Install Nagios Plugins<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/bestunixhosting.in\/blog\/installing-icinga-web-2-on-centos7\/#Install_Icinga_2\" title=\"Install Icinga 2\">Install Icinga 2<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/bestunixhosting.in\/blog\/installing-icinga-web-2-on-centos7\/#Enable_IDO_MySQL_Module\" title=\"Enable IDO MySQL Module\">Enable IDO MySQL Module<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/bestunixhosting.in\/blog\/installing-icinga-web-2-on-centos7\/#Setup_Command_Transport\" title=\"Setup Command Transport\">Setup Command Transport<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/bestunixhosting.in\/blog\/installing-icinga-web-2-on-centos7\/#Local_Command_File\" title=\"Local Command File\">Local Command File<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/bestunixhosting.in\/blog\/installing-icinga-web-2-on-centos7\/#Icinga_2_API\" title=\"Icinga 2 API\">Icinga 2 API<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/bestunixhosting.in\/blog\/installing-icinga-web-2-on-centos7\/#Firewall-2\" title=\"Firewall\">Firewall<\/a><\/li><\/ul><\/nav><\/div>\n<h4><span class=\"ez-toc-section\" id=\"Installing_Icinga_web_2_on_CentOS7_RHEL_7\"><\/span>Installing Icinga web 2 on CentOS7 \/ RHEL 7<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>In this post we are going to see the installation of Icinga web 2, a web interface for Icinga 2 where we can monitor our whole infrastructure in single place.<\/p>\n<p><a href=\"https:\/\/icinga.com\/\" target=\"_blank\" rel=\"noopener\">Icinga<\/a> is an open-source computer system and network monitoring application. It was originally created as a fork of the Nagios system monitoring application in 2009<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ol>\n<li>A web server, e.g., Apache or Nginx<\/li>\n<li>PHP 5.6.0 and above with cURL, gettext, intl, mbstring, OpenSSL, and XML support.<\/li>\n<li>PHP LDAP library when using LDAP or Active Directory authentication.<\/li>\n<li>PHP libraries for MySQL or PostgreSQL<\/li>\n<\/ol>\n<h4><span class=\"ez-toc-section\" id=\"Installing_PHP_and_PHP_Extensions\"><\/span><span style=\"text-decoration: underline;\"><span id=\"Install_PHP_and_PHP_Extensions\" class=\"ez-toc-section\">Installing PHP and PHP Extensions<\/span><\/span><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Icinga Web 2 requires PHP 5.6 and above. The PHP version you need for Icinga web 2 is higher than what is available on CentOS \/ Redhat base repositories. So, you would need to enable SCL repository and rhel-server-rhscl-7-rpms repository on CentOS and RHEL respectively.<\/p>\n<pre>yum install -y centos-release-scl\n\n<\/pre>\n<pre>yum -y install rh-php71-php-json rh-php71-php-pgsql rh-php71-php-xml rh-php71-php-intl rh-php71-php-common rh-php71-php-pdo rh-php71-php-mysqlnd rh-php71-php-cli rh-php71-php-mbstring rh-php71-php-fpm rh-php71-php-gd rh-php71-php-zip rh-php71-php-ldap rh-php71-php-imagick<\/pre>\n<p>You need to configure the time zone in the php.ini file.<\/p>\n<pre>nano\/etc\/opt\/rh\/rh-php71\/php.ini<\/pre>\n<p>Update the time zone as below syntax.<\/p>\n<pre>date.timezone = Asia\/Kolkata<\/pre>\n<p>Restart the PHP-FPM service.<\/p>\n<pre>systemctl restart rh-php71-php-fpm<\/pre>\n<p>Now, enable PHP-FPM service to start automatically at system boot.<\/p>\n<pre>systemctl enable rh-php71-php-fpm<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"Adding_Icinga_2_Repository\"><\/span><span style=\"text-decoration: underline;\">Adding Icinga 2 Repository<\/span><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Add Icinga 2 repository on your system in case if you don&#8217;t have the setup file already.<\/p>\n<pre>rpm --import https:\/\/packages.icinga.com\/icinga.key\nyum install https:\/\/packages.icinga.com\/epel\/icinga-rpm-release-7-latest.noarch.rpm<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"Installing_Icinga_Web_2\"><\/span><span style=\"text-decoration: underline;\">Installing Icinga Web 2<\/span><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Use the yum command on CentOS\/RHEL to install the Icinga Web 2 package along with Icinga CLI and Apache web server.<\/p>\n<pre>yum -y install icingaweb2 icingacli httpd<\/pre>\n<p>Enable the Apache service to start automatically at the system startup.<\/p>\n<pre>systemctl enable httpd\n\n<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"SELinux\"><\/span><span style=\"text-decoration: underline;\"><span id=\"SELinux\" class=\"ez-toc-section\">SELinux<\/span><\/span><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>If you are running Icinga Web 2 with SELinux enabled, then consider installing the below package to set policy for Icinga Web 2.<\/p>\n<pre>yum -y install icingaweb2-selinux<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"Firewall\"><\/span><span style=\"text-decoration: underline;\">Firewall<\/span><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Allow HTTP traffic to access Icinga Web 2 from external machines with<\/p>\n<pre>firewall-cmd --permanent --add-service=http\nfirewall-cmd --reload\n\n<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"Preparing_Icinga_Web_2_Setup\"><\/span><span style=\"text-decoration: underline;\"><span id=\"Preparing_Icinga_Web_2_Setup\" class=\"ez-toc-section\">Preparing Icinga Web 2 Setup<\/span><\/span><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Icinga CLI is used for performing administration tasks in the command line. Both Icinga Web 2 and CLI must have access to logs and configurations. Add web server user (apache) to the system group (icingaweb2)<\/p>\n<pre>groupadd -r icingaweb2\nusermod -a -G icingaweb2 apache<\/pre>\n<p>Create the Icinga Web 2 configuration directory.<\/p>\n<pre>icingacli setup config directory --group icingaweb2\n\n<\/pre>\n<p>Restart both Apache and PHP-FPM services.<\/p>\n<pre>systemctl restart httpd\nsystemctl restart rh-php71-php-fpm<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"Icinga_Web_2_Setup_Wizard\"><\/span><span style=\"text-decoration: underline;\"><span id=\"Icinga_Web_2_Setup_Wizard\" class=\"ez-toc-section\">Icinga Web 2 Setup Wizard<\/span><\/span><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>While visiting Icinga Web 2 for the first time, Icinga web setup wizard will guide you through all the steps for the successful installation of Icinga Web 2.<\/p>\n<p>http:\/\/your-server_ip_address\/icingaweb2\/setup<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/03\/Icinga-1.jpg\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1413 size-full\" src=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/03\/Icinga-1.jpg?resize=640%2C361\" alt=\"Installing Icinga web 2 on CentOS 7\" width=\"640\" height=\"361\" \/><\/a><\/p>\n<p>For security reason, you would need to generate the token for the Icinga Web 2 installation.<\/p>\n<p>Generate the token using the following command.<\/p>\n<pre>icingacli setup token create<\/pre>\n<p>Output:<\/p>\n<p><strong>The newly generated setup token is: 05b5b295ed4add63<\/strong><\/p>\n<p>Copy and paste the generated token on the setup page and click <strong>Next<\/strong>.<\/p>\n<p>In the next screen, you can choose to enable the modules that were installed during the Icinga 2 installation. Click <strong>Next<\/strong>.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/03\/icinga-2.jpg\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1414 size-full\" src=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/03\/icinga-2.jpg?resize=640%2C297\" alt=\"Installing Icinga web 2 on CentOS 7\" width=\"640\" height=\"297\" \/><\/a><\/p>\n<p>The following page shows the information about the system, time zone, and PHP extensions.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/03\/Icinga-3.jpg\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1415 size-full\" src=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/03\/Icinga-3.jpg?resize=640%2C359\" alt=\"Installing Icinga web 2 on CentOS 7\" width=\"640\" height=\"359\" \/><\/a><\/p>\n<p>If there are any warnings or error for other PHP extensions, then install the required extensions and then click the <strong>Refresh<\/strong> button.<\/p>\n<p>Otherwise, click Next to continue.<\/p>\n<p>In the next page, you need to tell how you want to authenticate when accessing Icinga Web 2. Icinga Web 2 supports Active Directory, LDAP, and Local as an authentication mechanism.<\/p>\n<p>Here, we will create a local Icinga Web 2 user account. So, select the authentication type as <strong>Database <\/strong>and click <strong>Next<\/strong>.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/03\/Icinga-4.jpg\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1416 size-full\" src=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/03\/Icinga-4.jpg?resize=640%2C198\" alt=\"Installing Icinga web 2 on CentOS 7\" width=\"640\" height=\"198\" \/><\/a><\/p>\n<p>Log in to MySQL server.<\/p>\n<p>To install mysql refer : <a href=\"https:\/\/www.webhostingchennai.co.in\/blog\/how-to-install-mysql-centos7\/\" target=\"_blank\" rel=\"noopener\">How to Install MySQL 8.0 on CentOS 7<\/a><\/p>\n<pre>CREATE DATABASE icingawebdb;\ncreate user 'icingaweb'@'localhost' identified by 'Icinga$123';\nGRANT ALL PRIVILEGES ON icingawebdb.* TO 'icingaweb'@'localhost';\n\n<\/pre>\n<p><a href=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/03\/Icinga-5.jpg\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1419 size-full\" src=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/03\/Icinga-5.jpg?resize=640%2C351\" alt=\"Installing Icinga web 2 on CentOS 7\" width=\"640\" height=\"351\" \/><\/a><\/p>\n<p>Set the authentication backend name and then click <strong>Next<\/strong>.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-6.jpg\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1420 size-full\" src=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-6.jpg?resize=640%2C191\" alt=\"Installing Icinga web 2 on CentOS 7\" width=\"640\" height=\"191\" \/><\/a><\/p>\n<p>Now, enter the admin user details on the next screen. Keep a note of this account information as you would need this for accessing Icinga Web 2.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-7.jpg\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1421 size-full\" src=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-7.jpg?resize=640%2C319\" alt=\"Installing Icinga web 2 on CentOS 7\" width=\"640\" height=\"319\" \/><\/a><\/p>\n<p>Now, Select where to save the application and logging configurations. Click <strong>Next<\/strong>.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-8.jpg\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1422 size-full\" src=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-8.jpg?resize=640%2C451\" alt=\"Installing Icinga web 2 on CentOS 7\" width=\"640\" height=\"451\" \/><\/a><\/p>\n<p>Now, we cab review the settings on the next screen.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-9.jpg\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1423 size-full\" src=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-9.jpg?resize=640%2C465\" alt=\"Installing Icinga web 2 on CentOS 7\" width=\"640\" height=\"465\" \/><\/a><\/p>\n<p>Click, <strong>Next<\/strong> to continue.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-10.jpg\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1424 size-full\" src=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-10.jpg?resize=640%2C380\" alt=\"Installing Icinga web 2 on CentOS 7\" width=\"640\" height=\"380\" \/><\/a><\/p>\n<p>Click <strong>Next<\/strong> on the configuration of the monitoring module for Icinga Web 2.<\/p>\n<p>Configure monitoring back end this tells how Icinga Web 2 retrieve the monitoring information. Here, we use IDO.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-11.jpg\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1425 size-full\" src=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-11.jpg?resize=640%2C317\" alt=\"Installing Icinga web 2 on CentOS 7\" width=\"640\" height=\"317\" \/><\/a><\/p>\n<p>Now create, the IDO database in the server.<\/p>\n<pre>create database icingaido;\ncreate user 'idouser'@'localhost' identified by 'Icinga$123';\nGRANT ALL PRIVILEGES ON icingaido.* TO 'idouser'@'localhost';\nFLUSH PRIVILEGES;<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"Install_IDO_modules_for_MySQL\"><\/span><span style=\"text-decoration: underline;\"><span id=\"Install_IDO_modules_for_MySQL\" class=\"ez-toc-section\">Install IDO modules for MySQL<\/span><\/span><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>yum -y install icinga2-ido-mysql<\/pre>\n<p>After creating the database and installing IDO modules , import the Icinga 2 IDO schema using the command.<\/p>\n<pre>mysql -u root -p icingaido &lt; \/usr\/share\/icinga2-ido-mysql\/schema\/mysql.sql\n\n<\/pre>\n<p>Now, new configuration file <strong>ido-mysql.conf<\/strong> has been created at <strong>\/etc\/icinga2\/features-available<\/strong><\/p>\n<p>Edit\u00a0 and save the configuration file as below.<\/p>\n<pre>object IdoMysqlConnection \"mysql-ido\" {\nhost = \"localhost\"\nport = 3306\nuser = \"idouser\"\npassword = \"Icinga$123\"\ndatabase = \"icingaido\"\n\ncleanup = {\ndowntimehistory_age = 48h\ncontactnotifications_age = 31d\n}\n}<\/pre>\n<p>If you are getting the below warning in the browser<\/p>\n<ul class=\"notification-warning\">\n<li><span style=\"color: #ff6600;\">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.<\/span><\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"Install_Nagios_Plugins\"><\/span><span style=\"text-decoration: underline;\"><span id=\"Install_Nagios_Plugins\" class=\"ez-toc-section\">Install Nagios Plugins<\/span><\/span><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>yum install nagios-plugins-all<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"Install_Icinga_2\"><\/span><span style=\"text-decoration: underline;\"><span id=\"Install_Icinga_2\" class=\"ez-toc-section\">Install Icinga 2<\/span><\/span><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>yum -y install icinga2<\/pre>\n<pre>systemctl start icinga2<\/pre>\n<pre>systemctl enable icinga2<\/pre>\n<p>Install icinga and start\u00a0 and To set Icinga 2 service to start automatically on system startup, run.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Enable_IDO_MySQL_Module\"><\/span><span style=\"text-decoration: underline;\"><span id=\"Enable_IDO_MySQL_Module\" class=\"ez-toc-section\">Enable IDO MySQL Module<\/span><\/span><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>icinga2 feature list\n\n<\/pre>\n<p>Output<\/p>\n<pre><span style=\"color: #ff0000;\">Disabled features:<\/span> api command compatlog debuglog elasticsearch gelf graphite influxdb livestatus opentsdb perfdata statusdata syslog\n<span style=\"color: #00ff00;\">Enabled features:<\/span> checker ido-mysql mainlog notification\n\n<\/pre>\n<p>Now, run the below command<\/p>\n<pre>icinga2 feature enable ido-mysql<\/pre>\n<p>Output<\/p>\n<pre>Enabling feature <span style=\"color: #ff00ff;\">ido-mysql<\/span>. Make sure to restart Icinga 2 for these changes to take effect.\n\n<\/pre>\n<pre>icinga2 feature enable command<\/pre>\n<pre>systemctl restart icinga2<\/pre>\n<pre>systemctl status icinga2\n\n<\/pre>\n<p>Make sure the icinga2 service is running.<\/p>\n<p>Now, Validate the settings<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-12.jpg\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1426 size-full\" src=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-12.jpg?resize=640%2C427\" alt=\"Installing Icinga web 2 on CentOS 7\" width=\"640\" height=\"427\" \/><\/a><\/p>\n<h4><span class=\"ez-toc-section\" id=\"Setup_Command_Transport\"><\/span><span style=\"text-decoration: underline;\"><span id=\"Setup_Command_Transport\" class=\"ez-toc-section\">Setup Command Transport<\/span><\/span><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>This page shows how we want to send commands to your monitoring instance.<\/p>\n<p>Icinga Web 2 supports Local Command File, Remote Command File, and Icinga 2 API as a <strong>Command Transport<\/strong>. You can define multiple command modes of transport in Icinga Web 2.<\/p>\n<p>For this article(demo), we will configure Icinga Web 2 with single command transport. Choose either one of the below command transport.<\/p>\n<p>Transport type:<\/p>\n<ol>\n<li>Local Command File<\/li>\n<li>Icinga 2 API (Recommended)<\/li>\n<li>Remote Command File<\/li>\n<\/ol>\n<p><a href=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-13.jpg\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1428 size-full\" src=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-13.jpg?resize=640%2C366\" alt=\"Installing Icinga web 2 on CentOS 7\" width=\"640\" height=\"366\" \/><\/a><\/p>\n<h4><span class=\"ez-toc-section\" id=\"Local_Command_File\"><\/span><span style=\"text-decoration: underline;\"><span id=\"Local_Command_File\" class=\"ez-toc-section\">Local Command File<\/span><\/span><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><a href=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-14.jpg\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1427 size-full\" src=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-14.jpg?resize=640%2C311\" alt=\"Installing Icinga web 2 on CentOS 7\" width=\"640\" height=\"311\" \/><\/a><\/p>\n<h4 id=\"api\"><span class=\"ez-toc-section\" id=\"Icinga_2_API\"><\/span><span style=\"text-decoration: underline;\"><span id=\"Icinga_2_API\" class=\"ez-toc-section\">Icinga 2 API<\/span><\/span><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Run the below command to setup Icinga 2 API.<\/p>\n<pre>icinga2 api setup<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<pre>[root@server ~]# icinga2 api setup\n<span style=\"color: #00ff00;\">information<\/span>\/cli: Generating new CA.\n<span style=\"color: #00ff00;\">information<\/span>\/base: Writing private key to '\/var\/lib\/icinga2\/ca\/\/ca.key'.\n<span style=\"color: #00ff00;\">information<\/span>\/base: Writing X509 certificate to '\/var\/lib\/icinga2\/ca\/\/ca.crt'.\n<span style=\"color: #00ff00;\">information<\/span>\/cli: Generating new CSR in '\/var\/lib\/icinga2\/certs\/\/server.webhostchennai.co.in.csr'.\n<span style=\"color: #00ff00;\">information<\/span>\/base: Writing private key to '\/var\/lib\/icinga2\/certs\/\/server.webhostchennai.co.in.key'.\n<span style=\"color: #00ff00;\">information<\/span>\/base: Writing certificate signing request to '\/var\/lib\/icinga2\/certs\/\/server.webhostchennai.co.in.csr'.\n<span style=\"color: #00ff00;\">information<\/span>\/cli: Signing CSR with CA and writing certificate to '\/var\/lib\/icinga2\/certs\/\/server.webhostchennai.co.in.crt'.\n<span style=\"color: #00ff00;\">information<\/span>\/pki: Writing certificate to file '\/var\/lib\/icinga2\/certs\/\/server.webhostchennai.co.in.crt'.\n<span style=\"color: #00ff00;\">information<\/span>\/cli: Copying CA certificate to '\/var\/lib\/icinga2\/certs\/\/ca.crt'.\n<span style=\"color: #00ff00;\">information<\/span>\/cli: Adding new ApiUser 'root' in '\/etc\/icinga2\/conf.d\/api-users.conf'.\n<span style=\"color: #00ff00;\">information<\/span>\/cli: Enabling the 'api' feature.\nEnabling feature <span style=\"color: #ff00ff;\">api<\/span>. Make sure to restart Icinga 2 for these changes to take effect.\n<span style=\"color: #00ff00;\">information<\/span>\/cli: Updating 'NodeName' constant in '\/etc\/icinga2\/constants.conf'.\n<span style=\"color: #00ff00;\">information<\/span>\/cli: Created backup file '\/etc\/icinga2\/constants.conf.orig'.\n<span style=\"color: #00ff00;\">information<\/span>\/cli: Updating 'ZoneName' constant in '\/etc\/icinga2\/constants.conf'.\n<span style=\"color: #00ff00;\">information<\/span>\/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<\/pre>\n<p>Get the API user details from <strong>\/etc\/icinga2\/conf.d\/api-users.conf<\/strong> file.<\/p>\n<pre>cat \/etc\/icinga2\/conf.d\/api-users.conf\n\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<pre>[root@server ~]# cat \/etc\/icinga2\/conf.d\/api-users.conf\n\/**\n* The ApiUser objects are used for authentication against the API.\n*\/\nobject ApiUser \"root\" {\npassword = \"a27fe418517e6586\"\n\/\/ client_cn = \"\"\n\npermissions = [ \"*\" ]\n}\n[root@server ~]#\n\n<\/pre>\n<p>Now, restart the Icinga 2 service..<\/p>\n<pre>systemctl restart icinga2<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"Firewall-2\"><\/span><span style=\"text-decoration: underline;\">Firewall<\/span><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>firewall-cmd --permanent --add-port=5665\/tcp\nfirewall-cmd --reload<\/pre>\n<p>Use the above username and password on the below command transport page.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-15.jpg\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1429 size-full\" src=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-15.jpg?resize=640%2C399\" alt=\"Installing Icinga web 2 on CentOS 7\" width=\"640\" height=\"399\" \/><\/a><\/p>\n<p>Enter the variables information to protect from bad ones.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-16.jpg\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1430 size-full\" src=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-16.jpg?resize=640%2C293\" alt=\"Installing Icinga web 2 on CentOS 7\" width=\"640\" height=\"293\" \/><\/a><\/p>\n<p>Now, Review your monitoring configurations and Click <strong>Finish<\/strong><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-17.jpg\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1431 size-full\" src=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-17.jpg?resize=640%2C464\" alt=\"Installing Icinga web 2 on CentOS 7\" width=\"640\" height=\"464\" \/><\/a><\/p>\n<p>If you see the below page, Icinga Web 2 has been successfully set up.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-18.jpg\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1432 size-full\" src=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-18.jpg?resize=640%2C448\" alt=\"Installing Icinga web 2 on CentOS 7\" width=\"640\" height=\"448\" \/><\/a><\/p>\n<p>Click on <strong>Login to Icinga Web 2<\/strong>.<\/p>\n<p>Login to Icinga Web 2 using the admin account which we created earlier.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-19.jpg\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1433 size-full\" src=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-19.jpg?resize=640%2C461\" alt=\"Installing Icinga web 2 on CentOS 7\" width=\"640\" height=\"461\" \/><\/a><\/p>\n<p>You should get the Icinga Web 2 dashboard like below.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-20.jpg\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1434 size-full\" src=\"https:\/\/i0.wp.com\/www.webhostingchennai.co.in\/blog\/wp-content\/uploads\/2019\/04\/Icinga-20.jpg?resize=640%2C325\" alt=\"Installing Icinga web 2 on CentOS 7\" width=\"640\" height=\"325\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Hope this article, helps your needs kindly share your valuable feedback to improve us.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installing Icinga web 2 on CentOS7 \/ RHEL 7 In this post we are going to see the installation of Icinga web 2, a web interface for Icinga 2 where we can monitor our whole infrastructure in single place. Icinga is an open-source computer system and network monitoring application. It was originally created as a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1437,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[76,34],"tags":[77,78,79,80,81],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/bestunixhosting.in\/blog\/wp-json\/wp\/v2\/posts\/1412"}],"collection":[{"href":"https:\/\/bestunixhosting.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bestunixhosting.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bestunixhosting.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bestunixhosting.in\/blog\/wp-json\/wp\/v2\/comments?post=1412"}],"version-history":[{"count":0,"href":"https:\/\/bestunixhosting.in\/blog\/wp-json\/wp\/v2\/posts\/1412\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bestunixhosting.in\/blog\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/bestunixhosting.in\/blog\/wp-json\/wp\/v2\/media?parent=1412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bestunixhosting.in\/blog\/wp-json\/wp\/v2\/categories?post=1412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bestunixhosting.in\/blog\/wp-json\/wp\/v2\/tags?post=1412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}