Icinga 2 è un sistema di monitoraggio open source per server, rete e servizi. È altamente scalabile e può monitorare ambienti piccoli e complessi.
Abilitare EPEL e repository Icinga
Su CentOS 8:
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm dnf config-manager --set-enabled PowerTools
Su RHEL 8:
ARCH=$( /bin/arch )
subscription-manager repos --enable rhel-8-server-optional-rpms
subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpmAggiungi il repository Icinga:
rpm --import https://packages.icinga.com/icinga.key dnf install -y https://packages.icinga.com/epel/icinga-rpm-release-8-latest.noarch.rpm
Installare Icinga 2
dnf install -y icinga2 systemctl start icinga2 systemctl enable icinga2
Se SELinux è attivo:
dnf install -y icinga2-selinux
Installa i plugin Nagios:
dnf install -y nagios-plugins-all
Apri la porta 5665 nel firewall:
firewall-cmd --permanent --add-port=5665/tcp firewall-cmd --reload
Configurare IDO MySQL
dnf install -y mariadb-server mariadb systemctl start mariadb systemctl enable mariadb mysql_secure_installation dnf install -y icinga2-ido-mysql
Crea il database:
mysql -u root -p
CREATE DATABASE icinga2; GRANT ALL PRIVILEGES ON icinga2.* TO 'icinga2'@'localhost' IDENTIFIED BY 'icinga123'; FLUSH PRIVILEGES; QUIT;
Importa lo schema:
cat /usr/share/icinga2-ido-mysql/schema/mysql.sql | mysql -u root -p icinga2
Abilita i moduli:
icinga2 feature enable ido-mysql icinga2 feature enable command
Modifica /etc/icinga2/features-enabled/ido-mysql.conf con le credenziali del database e riavvia Icinga 2:
systemctl restart icinga2
Icinga 2 è installato e pronto per essere collegato a Icinga Web 2.