How to install Icinga 2 on Open SUSE leap 42.3
To install Icinga 2 on Open SUSE leap 42.3
Icinga 2 is an open source application that monitors your network resources, notifies users of outages and generates data for reporting &ndash both scalable and extensible. It can also monitor large and even complex environments. It is so simple to install Icinga 2 on Open SUSE leap 42.3 and this tutorial covers the ground on the same process.
Pre Requisites
- LAMP Setup
- Apache
- Mariadb
- PHP 7 ( Modules : zypper install php php-mysql php-pecl-zip php-xml php-mbstring php-gd php-intl php-ldap php-ZendFramework php-ZendFramework-Db-Adapter-Pdo-Mysql)
Installing Icinga 2
First, you need to edit the configuration file. So make use of the following command which opens the file.
linuxhelp:~ # vim /etc/php7/apache2/php.ini
Change the time zone in it.
date.timezone = ' Asia/kolkata'
Once it is done, restart your apache service.
linuxhelp:~ # systemctl restart apache
After that, you need to add required repos for icinga 2 installation.
linuxhelp:~ # zypper ar https://packages.icinga.com/openSUSE/ICINGA-release.repo
Adding repository ' ICINGA (stable release for openSUSE1)' ........................................................................................................................[done]
Repository ' ICINGA (stable release for openSUSE1)' successfully added
URI : https://packages.icinga.com/openSUSE/42.3/release/
Enabled : Yes
GPG Check : Yes
Autorefresh : No
Priority : 99 (default priority)
Repository priorities are without effect. All enabled repositories share the same priority.
Once it is done, you need to refresh all the repositories.
linuhxelp:~ # zypper ref
Retrieving repository ' ICINGA (stable release for openSUSE1)' metadata ...........................................................................................................[done]
Building repository ' ICINGA (stable release for openSUSE1)' cache ................................................................................................................[done]
Repository ' openSUSE-Leap-42.3-0' is up to date.
Repository ' openSUSE-Leap-42.3-Non-Oss' is up to date.
Repository ' openSUSE-Leap-42.3-Oss' is up to date.
Repository ' openSUSE-Leap-42.3-Update' is up to date.
Repository ' openSUSE-Leap-42.3-Update-Non-Oss' is up to date.
All repositories have been refreshed.
After that, you shall proceed with the installation of Icinga and Nagios plugins with the help of the following command.
linuxhelp:~ # zypper install icinga2 nagios-plugins-all
Loading repository data...
Reading installed packages...
' nagios-plugins-all' not found in package names. Trying capabilities.
Resolving package dependencies...
The following 114 NEW packages are going to be installed:
clamav fping freeradius-client-libs icinga2 icinga2-bin icinga2-common icinga2-libs ipmitool latex2html-pngicons libboost_atomic1_54_0 libboost_chrono1_54_0
libboost_program_options1_54_0 libboost_regex1_54_0 libdbi3 libdbi-drivers-dbd-mysql libdbi-drivers-dbd-pgsql libdbi-drivers-dbd-sqlite3 libmilter1_0 libpq5 libyajl2
monitoring-plugins-all monitoring-plugins-bind monitoring-plugins-bonding monitoring-plugins-breeze monitoring-plugins-by_ssh monitoring-plugins-clamav monitoring-plugins-cluster
monitoring-plugins-common monitoring-plugins-contentage monitoring-plugins-cups monitoring-plugins-dbi monitoring-plugins-dbi-mysql monitoring-plugins-dbi-pgsql
monitoring-plugins-dbi-sqlite3 monitoring-plugins-dhcp monitoring-plugins-dig monitoring-plugins-disk monitoring-plugins-diskio monitoring-plugins-disk_smb monitoring-plugins-dns
monitoring-plugins-dummy monitoring-plugins-file_age monitoring-plugins-flexlm monitoring-plugins-fping monitoring-plugins-hpjd monitoring-plugins-http monitoring-plugins-icmp
monitoring-plugins-ide_smart monitoring-plugins-ifoperstatus monitoring-plugins-ifstatus monitoring-plugins-ipmi-sensor1 monitoring-plugins-ircd monitoring-plugins-ldap
monitoring-plugins-load monitoring-plugins-log monitoring-plugins-mailq monitoring-plugins-mem monitoring-plugins-mrtg monitoring-plugins-mrtgtraf monitoring-plugins-mysql
monitoring-plugins-mysql_health monitoring-plugins-nagios monitoring-plugins-nis monitoring-plugins-nt monitoring-plugins-ntp_peer monitoring-plugins-ntp_time.
.
.
.
.
(111/114) Installing: monitoring-plugins-dbi-2.1.2-3.1.x86_64 ....................................................................................................................[done]
(112/114) Installing: monitoring-plugins-dbi-mysql-2.1.2-3.1.x86_64 ..............................................................................................................[done]
(113/114) Installing: monitoring-plugins-dbi-pgsql-2.1.2-3.1.x86_64 ..............................................................................................................[done]
(114/114) Installing: monitoring-plugins-dbi-sqlite3-2.1.2-3.1.x86_64 ....................................................................
Later, start and enable Icinga 2 service by running the following commands.
linuxhelp:~ # systemctl start icinga2.service
linuxhelp:~ # systemctl enable icinga2.service
Created symlink from /etc/systemd/system/multi-user.target.wants/icinga2.service to /usr/lib/systemd/system/icinga2.service.
If you want to check out the features of Icinga and see if default checker, mainlog, and notification are enabled in it.
linuxhelp:~ # icinga2 feature list
Disabled features: api command compatlog debuglog elasticsearch gelf graphite influxdb livestatus opentsdb perfdata statusdata syslog
Enabled features: checker mainlog notification
You should also install IDO (Icinga Data Output Module)
linuxhelp:~ # zypper install icinga2-ido-mysql
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following NEW package is going to be installed:
icinga2-ido-mysql
1 new package to install.
Overall download size: 792.8 KiB. Already cached: 0 B. After the operation,
additional 3.8 MiB will be used.
Continue? [y/n/...? shows all options] (y): y
Retrieving package icinga2-ido-mysql-2.8.1-1.icinga.x86_64
(1/1), 792.8 KiB ( 3.8 MiB unpacked)
Retrieving: icinga2-ido-mysql-2.8.1-1.icinga.x86_64.rpm ....[done (320.0 KiB/s)]
Checking for file conflicts: .............................................[done]
(1/1) Installing: icinga2-ido-mysql-2.8.1-1.icinga.x86_64 ................[done]
Once it is installed, you need to create the database credentials for Icinga by making use of the following command.
linuxhelp:~ # mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with or g. Your MariaDB connection id is 6 Server version: 10.0.31-MariaDB SLE 12 SP1 package Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type ' help ' or ' h' for help. Type ' c' to clear the current input statement. MariaDB [(none)]> CREATE DATABASE icinga Query OK, 1 row affected (0.04 sec) MariaDB [(none)]> FLUSH PRIVILEGES Query OK, 0 rows affected (0.05 sec) MariaDB [(none)]> q Bye
After which you need to restore the .sql file into the created database.
linuxhelp:~ # mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/mysql.sql
Enter password:
Also, make sure you have enable IDO feature in it.
linuxhelp:~ # icinga2 feature enable ido-mysql
warning/cli: Feature ' ido-mysql' already enabled.
After that, you need to restart the service.
linuxhelp:~ # systemctl restart icinga2.service
Also, look for the status of Icinga 2.
linuxhelp:~ # systemctl status icinga2.service
● icinga2.service - Icinga host/service/network monitoring system
Loaded: loaded (/usr/lib/systemd/system/icinga2.service enabled vendor preset: disabled)
Drop-In: /etc/systemd/system/icinga2.service.d
└─limits.conf
Active: active (running) since Sat 2018-03-03 13:50:18 IST 45min ago
Process: 7136 ExecStart=/usr/sbin/icinga2 daemon -d -e ${ICINGA2_ERROR_LOG} (code=exited, status=0/SUCCESS)
Process: 7056 ExecStartPre=/usr/lib/icinga2/prepare-dirs /etc/sysconfig/icinga2 (code=exited, status=0/SUCCESS)
Main PID: 7168 (icinga2)
Tasks: 15
CGroup: /system.slice/icinga2.service
├─7165 /usr/lib64/icinga2/sbin/icinga2 --no-stack-rlimit daemon -d...
└─7168 /usr/lib64/icinga2/sbin/icinga2 --no-stack-rlimit daemon -d...
Mar 03 13:50:18 ws1 systemd[1]: Stopped Icinga host/service/network monitor...m.
Mar 03 13:50:18 ws1 systemd[1]: Starting Icinga host/service/network monito.....
Mar 03 13:50:18 ws1 systemd[1]: Started Icinga host/service/network monitor...m.
Hint: Some lines were ellipsized, use -l to show in full.
With this, the installation of Icinga 2 on Open SUSE leap 42.3 comes to an end.
Comments ( 0 )
No comments available