ICINGA2 - Installation, configuration et maintenance

L'outil exploité par Chezlepro.CA est ICINGA2, bonifié d'un module nommé "Business Process Module" ou BPM.  Ce dernier permet de concevoir des vues orientées sur la prestation des services, ce qui compte le plus pour Chezlepro.CA, ses partenaires, ainsi que leurs clients.
apt-get update
apt-get -y install apt-transport-https wget gnupg
wget -O - https://packages.icinga.com/icinga.key | apt-key add -

. /etc/os-release; if [ ! -z ${UBUNTU_CODENAME+x} ]; then DIST="${UBUNTU_CODENAME}"; else DIST="$(lsb_release -c| awk '{print $2}')"; fi;  \
echo "deb https://packages.icinga.com/ubuntu icinga-${DIST} main" >  /etc/apt/sources.list.d/${DIST}-icinga.list
echo "deb-src https://packages.icinga.com/ubuntu icinga-${DIST} main" >>  /etc/apt/sources.list.d/${DIST}-icinga.list

apt-get update
apt-get install icinga2
icinga2 daemon -C
apt-get install monitoring-plugins

AJOUT DU REGISTRE UBUNTU ET INSTALLATION DU MODULE

apt-get update
apt-get -y install apt-transport-https wget gnupg
wget -O - https://packages.icinga.com/icinga.key | apt-key add -
. /etc/os-release; if [ ! -z ${UBUNTU_CODENAME+x} ]; then DIST="${UBUNTU_CODENAME}"; else DIST="$(lsb_release -c| awk '{print $2}')"; fi; \
 echo "deb https://packages.icinga.com/ubuntu icinga-${DIST} main" > \
 /etc/apt/sources.list.d/${DIST}-icinga.list
 echo "deb-src https://packages.icinga.com/ubuntu icinga-${DIST} main" >> \
 /etc/apt/sources.list.d/${DIST}-icinga.list
apt-get update

apt-get install icingadb

CRÉER UNE BASE DE DONNÉES

mysql -u root -p

CREATE DATABASE icingadb;
CREATE USER 'icingadb'@'localhost' IDENTIFIED BY 'CHANGEME';
GRANT ALL ON icingadb.* TO 'icingadb'@'localhost';

mysql -u root -p icingadb </usr/share/icingadb/schema/mysql/schema.sql

systemctl enable --now icingadb

Ref.: https://icinga.com/docs/icinga-db/latest/doc/02-Installation/06-Ubuntu/

INSTALLATION DU MODULE

apt-get install icingadb-web

Suivre ce lien pour les instructions :
PRÉ-REQUIS :


apt-get update
apt-get -y install apt-transport-https wget gnupg
wget -O - https://packages.icinga.com/icinga.key | apt-key add -
. /etc/os-release; if [ ! -z ${UBUNTU_CODENAME+x} ]; then DIST="${UBUNTU_CODENAME}"; else DIST="$(lsb_release -c| awk '{print $2}')"; fi; \
 echo "deb https://packages.icinga.com/ubuntu icinga-${DIST} main" > \
 /etc/apt/sources.list.d/${DIST}-icinga.list
 echo "deb-src https://packages.icinga.com/ubuntu icinga-${DIST} main" >> \
 /etc/apt/sources.list.d/${DIST}-icinga.list
apt-get update

apt-get install icingaweb2 libapache2-mod-php icingacli


Ref.: https://icinga.com/docs/icinga-web/latest/doc/02-Installation/02-Ubuntu/
Successfully connected to existing database "icingaweb2"...
Creating database schema...
Login "icingaweb2" already exists...
Required privileges were already granted to login "icingaweb2".
The database has been fully set up!
General configuration has been successfully written to: /etc/icingaweb2/config.ini
Authentication configuration has been successfully written to: /etc/icingaweb2/authentication.ini
Account "admin" has been successfully created.
Account "admin" has been successfully defined as initial administrator.
User Group Backend configuration has been successfully written to: /etc/icingaweb2/groups.ini
User Group "Administrators" has been successfully created.
Account "admin" has been successfully added as member to user group "Administrators".
Resource configuration has been successfully written to: /etc/icingaweb2/resources.ini
Monitoring backend configuration has been successfully written to: /etc/icingaweb2/modules/monitoring/backends.ini
Resource configuration has been successfully updated: /etc/icingaweb2/resources.ini
Command transport configuration has been successfully created: /etc/icingaweb2/modules/monitoring/commandtransports.ini
Monitoring security configuration has been successfully created: /etc/icingaweb2/modules/monitoring/config.ini
Module "doc" has been successfully enabled.
Module "monitoring" has been successfully enabled.

AJOUT DU REGISTRE UBUNTU ET INSTALLATION DU MODULE

apt update
apt -y install apt-transport-https wget gnupg
wget -O - https://packages.icinga.com/icinga.key | gpg --dearmor -o /usr/share/keyrings/icinga-archive-keyring.gpg
. /etc/os-release; if [ ! -z ${UBUNTU_CODENAME+x} ]; then DIST="${UBUNTU_CODENAME}"; else DIST="$(lsb_release -c| awk '{print $2}')"; fi; \
 echo "deb [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" > \
 /etc/apt/sources.list.d/${DIST}-icinga.list
 echo "deb-src [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" >> \
 /etc/apt/sources.list.d/${DIST}-icinga.list
apt update

apt install icinga-director


CRÉER UNE BASE DE DONNÉES

mysql -e "CREATE DATABASE director CHARACTER SET 'utf8';
  CREATE USER director@localhost IDENTIFIED BY 'CHANGEME';
  GRANT ALL ON director.* TO director@localhost;"



CONFIGURER LE MODULE DANS ICINGA2

Se connecter en admin sur l'interface de Icinga Web 2
Créez une nouvelle ressource pour la base de données Icinga Director :
Configuration → Application → Ressources (configurer utf8 comme encodage) Sélectionner Icinga Director du menu principal pour être redirigé vers l'assistant de démarrage
Suivre les instructions et le tour est joué !

Ref. : https://icinga.com/docs/icinga-director/latest/doc/02-Installation/Ubuntu/

Sondages

SAUVEGARDES

MISES À JOUR

STOCKAGE

MÉMOIRE

CHARGE CPU

VÉRIFICATION DES MISES À JOUR

CERTIFICATS TLS

DHCP

DNS

FAIL2BAN

SSH