diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-26.10/assets/reporting/installation/centreon-mysql.cnf b/i18n/fr/docusaurus-plugin-content-docs/version-26.10/assets/reporting/installation/centreon-mysql.cnf new file mode 100644 index 000000000000..d5ee8ea23914 --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/version-26.10/assets/reporting/installation/centreon-mysql.cnf @@ -0,0 +1,54 @@ +[mysqld] +#datadir=/var/lib/mysql +#tmpdir = /var/lib/mysql/tmp +port = 3306 + +max_heap_table_size=512M +open_files_limit = 32000 +group_concat_max_len = 1M + +#By request( all engines) +tmp_table_size=512M +sort_buffer_size = 64M +join_buffer_size = 256M + +#During load or enable keys +bulk_insert_buffer_size = 1G +myisam_sort_buffer_size=1G + +table_open_cache = 2048 +thread_cache_size = 64 + +#Time out and linked problems +connect_timeout=28800 +innodb_lock_wait_timeout=28800 +wait_timeout=28800 +interactive_timeout=28800 +max_allowed_packet = 128M + +#Low query +slow_query_log=1 +slow_query_log_file=slow-queries.log +long_query_time=120 + +#At startup +key_buffer_size = 1G +innodb_buffer_pool_size = 1G + + +#Innob DB +innodb_stats_on_metadata=0 +innodb_flush_method=O_DIRECT +innodb_flush_log_at_trx_commit=2 +innodb_log_buffer_size=1G #taille buffer redo log +innodb_log_file_size=512M +innodb_file_per_table=1 +innodb_open_files=1024 +innodb_max_dirty_pages_pct=30 + + +[mysqld_safe] +log-error=/var/log/mysqld.log +pid-file=/var/run/mysqld/mysqld.pid +innodb_lock_wait_timeout=1500 + diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-26.10/assets/reporting/installation/centreon.cnf b/i18n/fr/docusaurus-plugin-content-docs/version-26.10/assets/reporting/installation/centreon.cnf index 02751848d984..2cb442c4dbe0 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/version-26.10/assets/reporting/installation/centreon.cnf +++ b/i18n/fr/docusaurus-plugin-content-docs/version-26.10/assets/reporting/installation/centreon.cnf @@ -32,21 +32,20 @@ slow_query_log_file=slow-queries.log long_query_time=120 #At startup -key_buffer_size = 2G +key_buffer_size = 1G query_cache_size=8M query_cache_type=1 query_cache_limit=1048576 -innodb_buffer_pool_size = 2G +innodb_buffer_pool_size = 1G -#Innob DB -innodb_stats_on_metadata=0 +#Innob DB +innodb_stats_on_metadata=0 innodb_flush_method=O_DIRECT innodb_flush_log_at_trx_commit=2 innodb_log_buffer_size=1G #taille buffer redo log innodb_log_file_size=512M -innodb_log_files_in_group=3 -innodb_file_per_table +innodb_file_per_table=1 innodb_open_files=1024 innodb_max_dirty_pages_pct=30 diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-26.10/installation/_database-repository.mdx b/i18n/fr/docusaurus-plugin-content-docs/version-26.10/installation/_database-repository.mdx index c62e849147c6..2c506ca8cf54 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/version-26.10/installation/_database-repository.mdx +++ b/i18n/fr/docusaurus-plugin-content-docs/version-26.10/installation/_database-repository.mdx @@ -64,7 +64,7 @@ dnf install -y --setopt=install_weak_deps=False mysql-server ```shell -mysql_apt_config="mysql-apt-config_0.8.34-1_all.deb" +mysql_apt_config="mysql-apt-config_0.8.36-1_all.deb" curl -fJLO "https://dev.mysql.com/get/$mysql_apt_config" echo "mysql-apt-config mysql-apt-config/select-server select mysql-8.4-lts" | debconf-set-selections export DEBIAN_FRONTEND="noninteractive" diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-26.10/reporting/installation.md b/i18n/fr/docusaurus-plugin-content-docs/version-26.10/reporting/installation.md index fff0fa2f76a7..ea62e28b27e8 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/version-26.10/reporting/installation.md +++ b/i18n/fr/docusaurus-plugin-content-docs/version-26.10/reporting/installation.md @@ -79,9 +79,9 @@ performances & d'isolation. Voir les [prérequis logiciels](../installation/prerequisites.md#caractéristiques-des-serveurs). - + -- Centreon Web 25.10 +- Centreon Web 26.10 - Vérifiez que `date.timezone` est correctement configurée dans le fichier `/etc/php.d/50-centreon.ini` ou `/etc/php.d/20-timezone.ini` (même que celui retourné par la commande `timedatectl status`) @@ -89,6 +89,8 @@ Voir les [prérequis logiciels](../installation/prerequisites.md#caractéristiqu configuration MariaDB `/etc/my.cnf`. Elles interrompent l'exécution de longues requêtes et peuvent arrêter les jobs d'ETL ou de génération de rapports : - wait_timeout - interactive_timeout + + Cette recommandation concerne uniquement la base de données de supervision. Le [fichier de configuration optimisé](#optimiser-la-base-de-données) de la base de données de reporting définit volontairement ces variables à 28800 secondes. | Utilisateur | Groupe | |----------------------|----------------------------| @@ -96,9 +98,9 @@ Voir les [prérequis logiciels](../installation/prerequisites.md#caractéristiqu | apache (existant) | centreonBI | - + -- Centreon Web 25.10 +- Centreon Web 26.10 - Vérifiez que `date.timezone` est correctement configurée dans le fichier `/etc/php.d/50-centreon.ini` ou `/etc/php.d/20-timezone.ini` (même que celui retourné par la commande `timedatectl status`) @@ -106,6 +108,8 @@ Voir les [prérequis logiciels](../installation/prerequisites.md#caractéristiqu configuration MariaDB `/etc/my.cnf`. Elles interrompent l'exécution de longues requêtes et peuvent arrêter les jobs d'ETL ou de génération de rapports : - wait_timeout - interactive_timeout + + Cette recommandation concerne uniquement la base de données de supervision. Le [fichier de configuration optimisé](#optimiser-la-base-de-données) de la base de données de reporting définit volontairement ces variables à 28800 secondes. | Utilisateur | Groupe | |----------------------|----------------------------| @@ -113,24 +117,26 @@ Voir les [prérequis logiciels](../installation/prerequisites.md#caractéristiqu | apache (existant) | centreonBI | - + -- Centreon Web 25.10 +- Centreon Web 26.10 - Vérifiez que `date.timezone` est correctement configurée dans le fichier - `/etc/php/8.2/mods-available/centreon.ini` ou `/etc/php/8.2/mods-available/timezone.ini` (même que celui retourné par la commande + `/etc/php/8.4/mods-available/centreon.ini` ou `/etc/php/8.4/mods-available/timezone.ini` (même que celui retourné par la commande `timedatectl status`) - Evitez l'utilisation des variables ci dessous dans le fichier de configuration MariaDB `/etc/mysql/mariadb.cnf`. Elles interrompent l'exécution de longues requêtes et peuvent arrêter les jobs d'ETL ou de génération de rapports : - wait_timeout - interactive_timeout -- Lors de la création de l'utilisateur CentreonBI, éxecutez la commande suivante : `adduser centreonBI --force-badname` + + Cette recommandation concerne uniquement la base de données de supervision. Le [fichier de configuration optimisé](#optimiser-la-base-de-données) de la base de données de reporting définit volontairement ces variables à 28800 secondes. +- Lors de la création de l'utilisateur CentreonBI, éxecutez la commande suivante : `adduser centreonBI --allow-bad-names` #### Utilisateurs et groupes | Utilisateur | Groupe | |----------------------|------------------------------| | centreonBI (nouveau) | www-data,centreon,centreonBI | -| apache (existant) | centreonBI | +| www-data (existant) | centreonBI | @@ -287,76 +293,37 @@ vgdisplay vg_data | grep -i free* - Firewalld : Désactivé ([voir ici](../installation/installation-of-a-central-server/using-packages.md#configurer-ou-désactiver-le-pare-feu)) - SELinux : Désactivé ([voir ici](../installation/installation-of-a-central-server/using-packages.md#désactiver-selinux)) -> Assurez-vous que le fuseau horaire du serveur de reporting est le même que celui du serveur central, sinon les publications de rapports échoueront (lien vers le téléchargement manquant). -> Le même fuseau horaire doit être affiché avec la commande `timedatectl`. -> Vous pouvez changer le fuseau horaire avec cette commande : -> ->```shell ->timedatectl set-timezone Europe/Paris ->``` - -Veillez à optimiser MariaDB/MySQL sur votre serveur de reporting. Vous aurez besoin -d'au moins 12GB de mémoire vive afin d'utiliser le -[fichier suivant](../assets/reporting/installation/centreon.cnf). - -> Si vous souhaitez utiliser un répertoire autre que `/var/lib/mysql/`, éditez les variables **datadir** et **tmpdir** du fichier centreon.cnf. +Assurez-vous que le fuseau horaire du serveur de reporting est le même que celui du serveur central, sinon les publications de rapports échoueront (lien vers le téléchargement manquant). Le fichier `/etc/localtime` doit également exister sur le serveur de reporting, sinon le script `install.sh` ne pourra pas créer le schéma de la base de données. -Assurez-vous que le dossier **tmp** soit créé dans la même partition que **/var/lib/mysql**. - -> Ne définissez pas ces optimisations MariaDB/MySQL sur votre serveur de supervision. - -Si vous utilisez MySQL : +1. Définissez le fuseau horaire du serveur de reporting pour qu'il soit le même que celui du serveur central (par exemple, `Europe/Paris`) : -1. Effectuez l'action suivante : - - - - -Dans le fichier `/etc/my.cnf.d/mysql-server.cnf`, ajoutez : - -```shell -log_bin_trust_function_creators=1 -``` + ```shell + timedatectl set-timezone Europe/Paris + ``` - - + Si le serveur central utilise UTC, utilisez `Etc/UTC` plutôt que `UTC`. Si le serveur de reporting indique déjà UTC, la commande `timedatectl set-timezone UTC` n'a aucun effet et ne crée pas le fichier `/etc/localtime`. -Dans le fichier `/etc/my.cnf.d/mysql-server.cnf`, ajoutez : +2. Vérifiez que le fichier `/etc/localtime` existe et pointe vers le bon fuseau horaire : -```shell -log_bin_trust_function_creators=1 -``` + ```shell + ls -l /etc/localtime + ``` - - + Le résultat doit ressembler à ceci : `/etc/localtime -> ../usr/share/zoneinfo/Europe/Paris`. -Dans le fichier `/etc/mysql/mysql.cnf`, ajoutez: +Veillez à optimiser MariaDB/MySQL sur votre serveur de reporting. Vous aurez BESOIN +d'au moins 12GB de mémoire vive afin d'utiliser le fichier de configuration optimisé. Autrement la base de données ne démarrera pas. Téléchargez le fichier correspondant à votre base de données : -```shell -[mysqld] -log_bin_trust_function_creators=1 -``` - - - - -2. Redémarrez MySQL. +- MariaDB : [centreon.cnf](../assets/reporting/installation/centreon.cnf) +- MySQL : [centreon-mysql.cnf](../assets/reporting/installation/centreon-mysql.cnf) -3. Vérifiez que la base de données que la variable suivante est appliquée : +Vous enregistrerez ce fichier sous le nom `85-centreon-bi.cnf` lors de l'étape [Optimiser la base de données](#optimiser-la-base-de-données). Conservez ce nom : le préfixe `85-` garantit que le fichier est lu après le fichier `80-centreon.cnf` installé par les paquets Centreon, afin que ses valeurs ne soient pas écrasées. -```shell -show global variables like 'log_bin_trust_function_creators'; -+---------------------------------+-------+ -| Variable_name | Value | -+---------------------------------+-------+ -| log_bin_trust_function_creators | ON | -``` +> Si vous souhaitez utiliser un répertoire autre que `/var/lib/mysql/`, éditez les variables **datadir** et **tmpdir** du fichier `85-centreon-bi.cnf`. -Si la variable n'est pas appliquée, activez-la manuellement : +Assurez-vous que le dossier **tmp** soit créé dans la même partition que **/var/lib/mysql**. -```shell -mysql> SET GLOBAL log_bin_trust_function_creators = 1; -``` +> Ne définissez pas ces optimisations MariaDB/MySQL sur votre serveur de supervision. Utilisateurs et groupes : @@ -379,21 +346,21 @@ Les actions listées à cette étape doivent être exécutées **sur le serveur 2. Puis lancez la commande suivante : - + ```shell dnf install centreon-bi-server ``` - + ```shell dnf install centreon-bi-server ``` - + Installez **gpg** : @@ -420,9 +387,74 @@ apt install centreon-bi-server Dans la base de données du central, donnez des droits trigger à l'utilisateur **centreon** : +1. Identifiez le ou les hôtes sur lesquels l'utilisateur **centreon** existe : + + ```shell + SELECT user, host FROM mysql.user WHERE user = 'centreon'; + ``` + +2. Donnez les droits à l'utilisateur **centreon** : + + ```shell + GRANT TRIGGER ON centreon.* TO 'centreon'@''; + GRANT TRIGGER ON centreon_storage.* TO 'centreon'@''; + ``` + + Remplacez **<host>** par la valeur renvoyée par la requête précédente (par exemple, `localhost` si la base de données est locale au serveur central, ou `%` ou une adresse IP si elle est distante). Si la requête renvoie plusieurs hôtes, exécutez ces commandes pour chacun d'entre eux. + +### Autoriser la création de fonctions (MySQL uniquement) + +Si la base de données du central utilise MySQL, effectuez les actions suivantes sur le serveur qui l'héberge avant d'activer l'extension. Sinon, l'installation échoue avec l'erreur `ERROR 1419` : l'extension apparaît comme installée, mais son menu et ses options sont absents. + +1. Effectuez l'action suivante : + + + + +Dans le fichier `/etc/my.cnf.d/mysql-server.cnf`, ajoutez : + +```shell +log_bin_trust_function_creators=1 +``` + + + + +Dans le fichier `/etc/my.cnf.d/mysql-server.cnf`, ajoutez : + +```shell +log_bin_trust_function_creators=1 +``` + + + + +Créez le fichier `/etc/mysql/conf.d/90-centreon-bi.cnf` et ajoutez : + +```shell +[mysqld] +log_bin_trust_function_creators=1 +``` + + + + +2. Redémarrez MySQL. + +3. Vérifiez que la base de données que la variable suivante est appliquée : + +```shell +show global variables like 'log_bin_trust_function_creators'; ++---------------------------------+-------+ +| Variable_name | Value | ++---------------------------------+-------+ +| log_bin_trust_function_creators | ON | +``` + +Si la variable n'est pas appliquée, activez-la manuellement : + ```shell -GRANT TRIGGER ON centreon.* TO `centreon`@'%'; -GRANT TRIGGER ON centreon_storage.* TO `centreon`@'%'; +mysql> SET GLOBAL log_bin_trust_function_creators = 1; ``` ### Activer l'extension @@ -440,14 +472,17 @@ MBI, menu **Rapports > Monitoring Business Intelligence > Paramètres globaux** | Onglet | Option | Value | |----------------------------------------------------------------------------------------|----------------------------|--------------------------------------------------------------------------------------| | Options de l'ordonnanceur | Hôte de CBIS | Adresse IP du serveur de reporting | -| Options de l'ETL | Une base de données MySQL dédiée au reporting a été mise en place | Oui | | +| Options de l'ETL | Une base de données MySQL dédiée au reporting a été mise en place | Oui | | Widgets de reporting* | Reporting MySQL database | Adresse IP de la base de reporting (par défaut = adresse IP du serveur de reporting) | +| Widgets de reporting* | Mot de passe | Mot de passe de l'utilisateur de base de données **centreonbi** sur le serveur de reporting | -\* *Le test de connexion ne fonctionnera pas encore à ce moment de l'installation* +\* *Le test de connexion ne fonctionnera pas encore à ce moment de l'installation.* -### Accès à la base de données centrale +> Le champ **Mot de passe** de l'onglet **Widgets de reporting** est prérempli avec **centreonbi**. Ce n'est pas le mot de passe que les scripts d'installation (**centreonMysqlRights.pl** et **install.sh**) définissent pour l'utilisateur **centreonbi**. Si vous conservez la valeur par défaut, les widgets ne peuvent pas se connecter à la base de reporting, et le test de connexion échoue avec l'erreur suivante : `Access denied for user 'centreonbi'@''`. + +Le mot de passe peut être mis à jour dans **Rapports > Monitoring Business Intelligence > Paramètres globaux > Widgets de reporting**. -Téléchargez la licence envoyée par l'équipe Centreon pour pouvoir commencer à configurer les options générales. +### Accès à la base de données centrale @@ -460,10 +495,13 @@ La base de données de supervision MariaDB est hébergée sur le serveur de supe Lancez la commande ci-dessous pour autoriser le serveur de reporting à se connecter aux bases de données du serveur de supervision. Utilisez l'option suivante : ```shell -perl /usr/share/centreon/www/modules/centreon-bi-server/tools/centreonMysqlRights.pl --root-password=@ROOTPWD@ +perl /usr/share/centreon/www/modules/centreon-bi-server/tools/centreonMysqlRights.pl --root-password=@MYSQLROOTPASSWORD@ ``` -**@ROOTPWD@**: Mot de passe root de la base MariaDB de supervision. S'il n'y a pas de mot de passe pour l'utilisateur "root", ne spécifiez pas l'option **root-password**. +Ce script retournera le mot de passe de l'utilisateur CentreonBI. +Le mot de passe peut être mis à jour dans **Rapports > Monitoring Business Intelligence > Paramètres globaux > Widgets de reporting**. + +@MYSQLROOTPASSWORD@: Mot de passe root de la base MariaDB de supervision. S'il n'y a pas de mot de passe pour l'utilisateur "root", ne spécifiez pas l'option root-password. @@ -473,10 +511,13 @@ La base de données de supervision MySQL est hébergée sur le serveur de superv Lancez la commande ci-dessous pour autoriser le serveur de reporting à se connecter aux bases de données du serveur de supervision. Utilisez l'option suivante : ```shell -perl /usr/share/centreon/www/modules/centreon-bi-server/tools/centreonMysqlRights.pl --root-password=@ROOTPWD@ +perl /usr/share/centreon/www/modules/centreon-bi-server/tools/centreonMysqlRights.pl --root-password=@MYSQLROOTPASSWORD@ ``` -**@ROOTPWD@**: Mot de passe root de la base MySQL de supervision. S'il n'y a pas de mot de passe pour l'utilisateur "root", ne spécifiez pas l'option **root-password**. +Ce script retournera le mot de passe de l'utilisateur CentreonBI. +Le mot de passe peut être mis à jour dans **Rapports > Monitoring Business Intelligence > Paramètres globaux > Widgets de reporting**. + +@MYSQLROOTPASSWORD@: Mot de passe root de la base MariaDB de supervision. S'il n'y a pas de mot de passe pour l'utilisateur "root", ne spécifiez pas l'option root-password. @@ -523,7 +564,7 @@ GRANT ALL PRIVILEGES ON centreon_storage.* TO 'centreonbi'@'$BI_ENGINE_IP$'; -Si vous utilisez la réplication MariaDB pour vos **bases de données de supervision**, certaines vues sont créées lors de l'installation de Centreon MBI. Vous devez les exclure de la réplication en ajoutant la ligne suivante dans le fichier **my.cnf** du serveur esclave ou mariadb.cnf sur Debian 12. +Si vous utilisez la réplication MariaDB pour vos **bases de données de supervision**, certaines vues sont créées lors de l'installation de Centreon MBI. Vous devez les exclure de la réplication en ajoutant la ligne suivante dans le fichier **my.cnf** du serveur esclave ou mariadb.cnf sur Debian 13. ```shell replicate-wild-ignore-table=centreon.mod_bi_%v01,centreon.mod_bi_%V01 @@ -538,7 +579,7 @@ Ensuite, créez les vues manuellement sur le serveur esclave : mysql centreon < /tmp/view_creation.sql ``` -#### Configuration spécifique à Debian 12 +#### Configuration spécifique à Debian 13 MariaDB doit écouter sur toutes les interfaces au lieu d'écouter sur localhost/127.0.0.1 (valeur par défaut). Éditez le fichier suivant : @@ -555,7 +596,7 @@ systemctl restart mariadb -Si vous utilisez la réplication MySQL pour vos bases de données de supervision, certaines vues sont créées lors de l'installation de Centreon MBI. Vous devez les exclure de la réplication en ajoutant la ligne suivante dans le fichier my.cnf du serveur esclave ou mysql.cnf sur Debian 12. +Si vous utilisez la réplication MySQL pour vos bases de données de supervision, certaines vues sont créées lors de l'installation de Centreon MBI. Vous devez les exclure de la réplication en ajoutant la ligne suivante dans le fichier my.cnf du serveur esclave. Sur Debian 13, ajoutez-la dans la section **[mysqld]** d'un fichier situé dans `/etc/mysql/conf.d/` (par exemple `/etc/mysql/conf.d/centreon.cnf`). ```shell replicate-wild-ignore-table=centreon.mod_bi_%v01,centreon.mod_bi_%V01 @@ -571,15 +612,16 @@ Ensuite, créez les vues manuellement sur le serveur esclave : mysql centreon < /tmp/view_creation.sql ``` -#### Configuration spécifique à Debian 12 +#### Configuration spécifique à Debian 13 -MySQL doit écouter sur toutes les interfaces au lieu d'écouter sur localhost/127.0.0.1 (valeur par défaut). Éditez le fichier suivant :: +MySQL doit écouter sur toutes les interfaces au lieu d'écouter sur localhost/127.0.0.1 (valeur par défaut). Ajoutez les lignes suivantes dans un fichier situé dans `/etc/mysql/conf.d/` (par exemple `/etc/mysql/conf.d/centreon.cnf`) : ```shell -/etc/mysql/mysql.conf.d/mysqld.cnf +[mysqld] +bind-address=0.0.0.0 ``` -Donnez au paramètre **bind-address** la valeur **0.0.0.0** et redémarrez **mysql**. +Puis redémarrez **mysql**. ```shell systemctl restart mysql @@ -639,39 +681,51 @@ Pendant l'installation de la base de données, notez le mot de passe du compte * 1. Installez le dépôt standard : - + ```shell dnf install -y dnf-plugins-core -dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/25.10/el8/centreon-25.10.repo +dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/26.10/el9/centreon-26.10.repo dnf clean all --enablerepo=* dnf update ``` - + ```shell dnf install -y dnf-plugins-core -dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/25.10/el9/centreon-25.10.repo +dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/26.10/el10/centreon-26.10.repo dnf clean all --enablerepo=* dnf update ``` - + Installez les paquets prérequis : ```shell -echo "deb https://packages.centreon.com/apt-standard/ $(lsb_release -sc)-25.10-stable main" | tee -a /etc/apt/sources.list.d/centreon-25.10-stable.list -echo "deb https://packages.centreon.com/apt-plugins-stable/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/centreon-plugins.list +apt update && apt install -y lsb-release ca-certificates apt-transport-https wget gnupg2 curl cron +systemctl enable --now cron ``` -Ensuite, importez la clé du dépôt : +Vérifiez que le service **cron** est actif : ```shell -wget -O- https://apt-key.centreon.com | gpg --dearmor | tee /etc/apt/trusted.gpg.d/centreon.gpg > /dev/null 2>&1 +systemctl is-active cron +``` + +La commande doit renvoyer `active`. + +Installez les dépôts Centreon : + +```shell +install -d /etc/apt/keyrings +wget -O /etc/apt/keyrings/centreon.asc https://apt-key.centreon.com + +echo "deb [signed-by=/etc/apt/keyrings/centreon.asc] https://packages.centreon.com/apt-standard/ $(lsb_release -sc)-26.10-stable main" | tee /etc/apt/sources.list.d/centreon-26.10-stable.list +echo "deb [signed-by=/etc/apt/keyrings/centreon.asc] https://packages.centreon.com/apt-plugins-stable/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/centreon-plugins.list apt update ``` @@ -687,85 +741,85 @@ apt update #### Installer les dépendances - + Installez le dépôt **epel** : ```shell -dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm +dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm ``` Activer les dépôts **codeready-builder** : ```shell -subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms +subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms ``` - + Installez le dépôt **epel** : ```shell -dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm +dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm ``` Activer les dépôts **codeready-builder** : ```shell -dnf config-manager --set-enabled ol8_codeready_builder +dnf config-manager --set-enabled ol9_codeready_builder ``` - + Installez le dépôt **epel** : ```shell -dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm +dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm ``` -Activez les dépôts powertools : +Activez les dépôts **crb** : ```shell -dnf config-manager --set-enabled 'powertools' +dnf config-manager --set-enabled 'crb' ``` - + Installez le dépôt **epel** : ```shell -dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm +dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm ``` Activer les dépôts **codeready-builder** : ```shell -subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms +subscription-manager repos --enable codeready-builder-for-rhel-10-x86_64-rpms ``` - + Installez le dépôt **epel** : ```shell -dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm +dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm ``` Activez les dépôts **codeready-builder** : ```shell -dnf config-manager --set-enabled ol9_codeready_builder +dnf config-manager --set-enabled ol10_codeready_builder ``` - + Installez le dépôt **epel** : ```shell -dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm +dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm ``` Exécutez la commande suivante : @@ -775,7 +829,7 @@ dnf config-manager --set-enabled 'crb' ``` - + Pas de dépendances requises. @@ -787,21 +841,21 @@ Pas de dépendances requises. - + ```shell dnf install MariaDB-server MariaDB-client ``` - + ```shell dnf install MariaDB-server MariaDB-client ``` - + ```shell apt update @@ -815,10 +869,10 @@ apt install mariadb-server mariadb-client - + ```shell -dnf install https://dev.mysql.com/get/mysql84-community-release-el8-1.noarch.rpm +dnf install https://dev.mysql.com/get/mysql84-community-release-el9-1.noarch.rpm dnf config-manager --enable mysql-8.4-lts-community dnf module disable mysql dnf install mysql-community-server @@ -826,7 +880,7 @@ systemctl start mysqld ``` - + ```shell dnf install -y mysql-server mysql @@ -836,18 +890,14 @@ echo "default-authentication-plugin=mysql_native_password" >> /etc/my.cnf.d/mysq systemctl daemon-reload systemctl restart mysqld systemctl list-units --type=service | grep -i mysql -sudo sed -Ei 's/LimitNOFILE\s*=\s*[0-9]+/LimitNOFILE = 32000/' /usr/lib/systemd/system/mysqld -sudo systemctl start mysqld -sudo systemctl status mysqld ``` - + ```shell apt update apt install -y centreon-mysql -# Sélectionner "Use Legacy Authentication Method" systemctl daemon-reload systemctl restart mysql ``` @@ -861,21 +911,21 @@ systemctl restart mysql #### Installer le module MBI sur le serveur MBI - + ```shell dnf install centreon-bi-reporting-server ``` - + ```shell dnf install centreon-bi-reporting-server ``` - + ```shell apt update @@ -885,21 +935,7 @@ apt install centreon-bi-reporting-server -Assurez-vous qu'une version de Java 17 (ou 18) est installée. - - - Pour vérifier quelle version de Java est installée, entrez la commande suivante : - - ```shell - java -version - ``` - - - Pour une mise à jour de Java en version 17 (ou 18), allez sur la [page officielle de téléchargement d'Oracle](https://www.oracle.com/java/technologies/downloads/#java17). - - - Si plusieurs versions de Java sont installées, vous devez activer la bonne version. Affichez les versions installées avec la commande suivante puis sélectionnez la version 17 (ou 18) : - - ```shell - sudo update-alternatives --config java - ``` +Lors de l'installation des paquets MBI, java (OpenJDK 25) sera automatiquement installé en tant que dépendance, si nécessaire. Le service **cbis** utilise toujours **/usr/lib/jvm/java-25-openjdk** sur Alma / RHEL / Oracle Linux et **/usr/lib/jvm/java-25-openjdk-amd64** sur Debian 13. #### Activer les services @@ -920,9 +956,9 @@ systemctl start gorgoned && systemctl enable gorgoned - + -Assurez vous que [le fichier](../assets/reporting/installation/centreon.cnf) de configuration optimisé fourni dans les pré-requis est bien présent dans `/etc/my.cnf.d/`, puis redémarrez le service MariaDB : +Copiez le [fichier de configuration optimisé](../assets/reporting/installation/centreon.cnf) fourni dans les prérequis vers `/etc/my.cnf.d/85-centreon-bi.cnf`, puis redémarrez le service MariaDB : ```shell systemctl restart mariadb @@ -951,9 +987,9 @@ socket=$PATH_TO_SOCKET$ ``` - + -Assurez vous que [le fichier](../assets/reporting/installation/centreon.cnf) de configuration optimisé fourni dans les pré-requis est bien présent dans `/etc/my.cnf.d/`, puis redémarrez le service MariaDB : +Copiez le [fichier de configuration optimisé](../assets/reporting/installation/centreon.cnf) fourni dans les prérequis vers `/etc/my.cnf.d/85-centreon-bi.cnf`, puis redémarrez le service MariaDB : ```shell systemctl restart mariadb @@ -962,7 +998,10 @@ systemctl restart mariadb Il est nécessaire de modifier la limitation **LimitNOFILE**. Changer cette option dans `/etc/my.cnf` NE fonctionnera PAS. ```shell -echo "deb https://packages.centreon.com/apt-standard/ $(lsb_release -sc)-25.10-stable main" | tee -a /etc/apt/sources.list.d/centreon-25.10-stable.list +mkdir -p /etc/systemd/system/mariadb.service.d/ +echo -ne "[Service]\nLimitNOFILE=32000\n" | tee /etc/systemd/system/mariadb.service.d/limits.conf +systemctl daemon-reload +systemctl restart mariadb ``` Si le service MariaDB échoue lors du démarrage, supprimer les fichiers *ib_logfile* (MariaDB doit absolument être stoppé) puis redémarrer à nouveau MariaDB : @@ -978,15 +1017,9 @@ socket=$PATH_TO_SOCKET$ ``` - - -Assurez vous que [le fichier](../assets/reporting/installation/centreon.cnf) de configuration optimisé fourni dans les pré-requis est bien présent dans `/etc/my.cnf.d/`, puis redémarrez le service MariaDB : + -Renommez le fichier en `80-centreon.cnf`: - -```shell -mv centreon.cnf 80-centreon.cnf -``` +Copiez le [fichier de configuration optimisé](../assets/reporting/installation/centreon.cnf) fourni dans les prérequis vers `/etc/mysql/mariadb.conf.d/85-centreon-bi.cnf`. MariaDB doit écouter toutes les interfaces au lieu de localhost/127.0.0.1, qui est la valeur par défaut. Éditez le fichier suivant : @@ -1027,9 +1060,9 @@ socket=$PATH_TO_SOCKET$ - + -Assurez vous que [le fichier](../assets/reporting/installation/centreon.cnf) de configuration optimisé fourni dans les pré-requis est bien présent dans `/etc/my.cnf.d/`, puis redémarrez le service MySQL : +Copiez le [fichier de configuration optimisé](../assets/reporting/installation/centreon-mysql.cnf) fourni dans les prérequis vers `/etc/my.cnf.d/85-centreon-bi.cnf`, puis redémarrez le service MySQL : ```shell systemctl restart mysql @@ -1041,7 +1074,7 @@ Il est nécessaire de modifier la limitation **LimitNOFILE**. Changer cette opti mkdir -p /etc/systemd/system/mysql.service.d/ echo -ne "[Service]\nLimitNOFILE=32000\n" | tee /etc/systemd/system/mysql.service.d/limits.conf systemctl daemon-reload -systemctl restart mysql +systemctl enable mysql ``` Si le service MySQL échoue lors du démarrage, supprimez les fichiers *ib_logfile* (MySQL doit absolument être stoppé) puis redémarrez à nouveau MySQL : @@ -1058,20 +1091,11 @@ socket=$PATH_TO_SOCKET$ ``` - - -Assurez vous que [le fichier](../assets/reporting/installation/centreon.cnf) de configuration optimisé fourni dans les pré-requis est bien présent dans `/etc/my.cnf.d/`, puis redémarrez le service MySQL : - -```shell -systemctl restart mysql -``` + -Il est nécessaire de modifier la limitation **LimitNOFILE**. Changer cette option dans `/etc/my.cnf` NE fonctionnera PAS. +Copiez le [fichier de configuration optimisé](../assets/reporting/installation/centreon-mysql.cnf) fourni dans les prérequis vers `/etc/my.cnf.d/85-centreon-bi.cnf`, puis redémarrez le service MySQL : ```shell -mkdir -p /etc/systemd/system/mysql.service.d/ -echo -ne "[Service]\nLimitNOFILE=32000\n" | tee /etc/systemd/system/mysql.service.d/limits.conf -systemctl daemon-reload systemctl restart mysql ``` @@ -1089,36 +1113,30 @@ socket=$PATH_TO_SOCKET$ ``` - + -Assurez vous que [le fichier](../assets/reporting/installation/centreon.cnf) -de configuration optimisé fourni dans les pré-requis est bien présent dans `/etc/mysql/mysql.conf.d/`. +Copiez le [fichier de configuration optimisé](../assets/reporting/installation/centreon-mysql.cnf) fourni dans les prérequis vers `/etc/mysql/conf.d/85-centreon-bi.cnf`. Ne le nommez pas `80-centreon.cnf` : cela écraserait le fichier installé par le paquet **centreon-mysql**. -Renommez le fichier en `80-centreon.cnf`: +MySQL doit écouter toutes les interfaces au lieu de localhost/127.0.0.1, qui est la valeur par défaut. Ajoutez les lignes suivantes dans un fichier situé dans `/etc/mysql/conf.d/` (par exemple `/etc/mysql/conf.d/centreon.cnf`) : ```shell -mv centreon.cnf 80-centreon.cnf -``` - -MySQL doit écouter toutes les interfaces au lieu de localhost/127.0.0.1, qui est la valeur par défaut. Éditez le fichier suivant : - -```shell -/etc/mysql/mysql.conf.d/mysqld.cnf +[mysqld] +bind-address=0.0.0.0 ``` -Définissez le paramètre **bind-address** à **0.0.0.0** et redémarrez mysql. +Puis redémarrez mysql. ```shell systemctl restart mysql ``` -Il est nécessaire de modifier la limitation **LimitNOFILE**. Changer cette option dans `/etc/mysql/mysql.cnf` NE fonctionnera PAS. +Il est nécessaire de modifier la limitation **LimitNOFILE**. Changer cette option dans les fichiers de configuration MySQL (`/etc/mysql/my.cnf` ou `/etc/mysql/conf.d/`) NE fonctionnera PAS. ```shell mkdir -p /etc/systemd/system/mysql.service.d/ echo -ne "[Service]\nLimitNOFILE=32000\n" | tee /etc/systemd/system/mysql.service.d/limits.conf systemctl daemon-reload -systemctl restart mysql +systemctl enable mysql ``` Si le service MySQL échoue lors du démarrage, supprimez les fichiers *ib_logfile* (MySQL doit absolument être stoppé) puis redémarrez à nouveau MySQL : @@ -1128,7 +1146,7 @@ rm -f /var/lib/mysql/ib_logfile* systemctl start mysql ``` -Si vous utilisez un fichier de socket spécifique pour MySQL, modifiez le fichier `/etc/mysql/mysql.cnf` et dans la section [client], ajoutez : +Si vous utilisez un fichier de socket spécifique pour MySQL, ajoutez la ligne suivante dans la section [client] d'un fichier situé dans `/etc/mysql/conf.d/` (par exemple `/etc/mysql/conf.d/centreon.cnf`) : ```shell socket=$PATH_TO_SOCKET$ @@ -1143,7 +1161,7 @@ socket=$PATH_TO_SOCKET$ ### Sécuriser la base de données Il est obligatoire de sécuriser l'accès root de la base de données avant d'installer Centreon. -Si vous utilisez une base de données locale, exécutez la commande suivante sur le serveur central, sinon sur le serveur de base de données : +Exécutez les commandes suivantes sur le serveur de reporting : @@ -1152,17 +1170,43 @@ Si vous utilisez une base de données locale, exécutez la commande suivante sur mariadb-secure-installation ``` +Répondez **oui** à toutes les questions, sauf à "Disallow root login remotely?" + -```shell -mysql_secure_installation -``` +1. Définissez le mot de passe de votre choix pour l'utilisateur **root** de la base de données (dans la commande suivante, remplacez **my_password** par votre propre mot de passe) : + + ```shell + db_root_password='my_password' + mysql_root_auth=(--ssl-mode=DISABLED -u root) + if ! mysql --ssl-mode=DISABLED -u root -e "SELECT 1" >/dev/null 2>&1; then + mysql_temp_pw=$(grep 'temporary password is generated for root@localhost' /var/log/mysqld.log \ + 2>/dev/null | tail -1 | sed -E 's/.*root@localhost: //') + if [ -z "$mysql_temp_pw" ]; then + echo "Could not authenticate to MySQL as root" >&2 + exit 1 + fi + mysql_root_auth=(--ssl-mode=DISABLED --connect-expired-password -u root -p"${mysql_temp_pw}") + fi + ``` + +2. Remplacez ensuite le mot de passe généré automatiquement par défaut par le vôtre : + + ```shell + mysql "${mysql_root_auth[@]}" --verbose < -- Répondez **oui** à toutes les questions, sauf à "Disallow root login remotely?" - Il est obligatoire de définir un mot de passe pour l'utilisateur **root** de la base de données. Vous aurez besoin de ce mot de passe pendant l'[installation web](../installation/web-and-post-installation.md). > Voir les procédures avancées pour [sécuriser votre plateforme MBI](../reporting/secure-your-mbi-platform.md). @@ -1170,7 +1214,7 @@ mysql_secure_installation #### Commencer à configurer Vérifiez que la base de reporting est bien démarrée puis lancez les -commandes ci dessous et répondez aux questions: +commandes ci dessous et répondez aux questions. Pour la question "database type for reporting database", sélectionnez MySQL ou MariaDB, ne laissez pas l'option par défaut "Automatic Discovery", cela cause une erreur. ```shell /usr/share/centreon-bi/config/install.sh @@ -1183,7 +1227,7 @@ Une fois l'installation terminée, poursuivez au chapitre suivant pour configure #### Problème avec l'échange de la clé SSH -Dans quelques cas, l'échange de clés SSH échoue. +Dans quelques cas, l'échange de clés SSH échoue, par exemple lorsque l'authentification par mot de passe est désactivée sur le serveur de supervision (`PasswordAuthentication no` dans `/etc/ssh/sshd_config`). Afin de résoudre le problème, procédez manuellement comme suit : Connectez-vous avec l'utilisateur `centreonBI` : @@ -1206,10 +1250,10 @@ cat /home/centreonBI/.ssh/id_ed25519.pub Maintenant, **sur le serveur de supervision** : -Créez un dossier `.ssh` dont `centreonBI` sera propriétaire, restreingez les droits sur ce fichier et collez dans le fichier `authorized_keys` le contenu de sa clé publique sur le serveur de reporting (affichée précédemment) : +Créez un dossier `.ssh` dont `centreonBI` sera propriétaire, restreignez les droits sur ce dossier et sur le fichier `authorized_keys`, et collez dans le fichier `authorized_keys` le contenu de sa clé publique sur le serveur de reporting (affichée précédemment) : ```bash -mkdir -p /home/centreonBI/.ssh/ && chown centreonBI: /home/centreonBI/.ssh/ && chmod 700 /home/centreonBI/.ssh/ && echo "@contenu de la clé publique@" > /home/centreonBI/.ssh/authorized_keys +mkdir -p /home/centreonBI/.ssh/ && chown centreonBI: /home/centreonBI/.ssh/ && chmod 700 /home/centreonBI/.ssh/ && echo "@contenu de la clé publique@" > /home/centreonBI/.ssh/authorized_keys && chown centreonBI: /home/centreonBI/.ssh/authorized_keys && chmod 600 /home/centreonBI/.ssh/authorized_keys ``` L'échange de clés doit enfin être validé par une première connexion qui acceptera la signature du serveur SSH. @@ -1222,7 +1266,6 @@ ssh centreonBI@@MONITORING_SERVER@ Vous pouvez maintenant quitter la session `centreonBI` avec `exit` ou `Ctrl-D`. Pour continuer, relancez le script d'installation (`/usr/share/centreon-bi/config/install.sh`) comme ci-dessus et répondez **Oui** lorsqu'on vous demande de procéder à l'échange de clés SSH. -Vous aurez une erreur lors de la création de l'USER car il existe déjà. Ce n'est pas une étape bloquante. ## Étape 4 : Configurez l'ETL dans l'interface de Centreon @@ -1234,8 +1277,7 @@ Centreon MBI intègre un ETL qui permet de : données statistiques - Contrôler la rétention des données sur le serveur de reporting - +#### Configuration générale de l'ETL Dans le menu `Rapports > Monitoring Business Intelligence > Options générales > Options de l'ETL`, spécifiez les options suivantes : @@ -1329,7 +1371,7 @@ Pour activer la purge automatique des anciennes données, modifiez le fichier cr Vous pouvez exécuter ce cron quotidiennement ou hebdomadairement, en fonction du temps d'exécution du batch et de la charge générée sur le serveur. - + Redémarrez le service cron : @@ -1338,7 +1380,7 @@ systemctl restart crond ``` - + Redémarrez le service cron : @@ -1367,25 +1409,23 @@ Veuillez passer à la section suivante pour continuer l'installation. * Configurez et activez la rétention des données afin que seules les données requises soient importées et calculées. * Assurez-vous que [les données soient prêtes sur le serveur central](how-mbi-works.md#phase-1--les-données-sont-préparées-par-le-serveur-central). * Assurez-vous que le processus **gorgoned** finctionne correctement : `systemctl status gorgoned`. Si besoin, redémarrez-le: `systemctl restart gorgoned`. -* Attention, si vous créez la base de données MBI pour la première fois, vous devez importer toutes les données en une seule fois. Si vous disposez d'une grande quantité de données et/ou si vous démarrez le processus tard dans la journée, il est important de savoir que la phase de création de la base de données peut prendre un temps considérable, pouvant même se prolonger jusqu'au lendemain. Dans ce cas, vous devez désactiver [temporairement](#réactiver-lexécution-quotidienne-du-script) l'exécution quotidienne de l'ETL, jusqu'à ce que le provisionnement initial soit terminé, afin d'éviter les doublons ou d'autres problèmes. - - 1. Éditez le fichier cron **/etc/cron.d/centreon-bi-engine** et commentez la ligne suivante : +* Attention, si vous créez la base de données MBI pour la première fois, vous devez importer toutes les données en une seule fois. Si vous disposez d'une grande quantité de données et/ou si vous démarrez le processus tard dans la journée, il est important de savoir que la phase de création de la base de données peut prendre un temps considérable, pouvant même se prolonger jusqu'au lendemain. C'est pourquoi l'exécution quotidienne de l'ETL est désactivée par défaut : dans le fichier cron **/etc/cron.d/centreon-bi-engine**, la ligne suivante est commentée. Elle doit le rester jusqu'à ce que le provisionnement initial soit terminé, afin d'éviter les doublons ou d'autres problèmes. Vous la [réactiverez](#réactiver-lexécution-quotidienne-du-script) à la fin de la procédure. - ```shell - #30 4 * * * root /usr/share/centreon-bi/bin/centreonBIETL -d >> /var/log/centreon-bi/centreonBIETL.log 2>&1 - ``` + ```shell + #30 4 * * * root /usr/share/centreon-bi//bin/centreonBIETL -d >> /var/log/centreon-bi/centreonBIETL.log 2>&1 + ``` - 2. Redémarrez **crond**. + Si cette ligne n'est pas commentée (par exemple, si vous reconstruisez la base de données), commentez-la, puis redémarrez le service cron : - + ```shell systemctl restart crond ``` - + ```shell systemctl restart cron @@ -1413,7 +1453,7 @@ Vous pouvez l'exécuter en arrière-plan et rediriger la sortie du script vers u nohup /usr/share/centreon-bi//bin/centreonBIETL -r >> /var/log/centreon-bi/centreonBIETL.log 2>&1 & ``` -Regardez le fichier de log **/var/log/centreon-bi/centreonBIETL.log** : vous devriez voir des lignes avec les 4 parties suivantes : +La sortie s'affiche dans votre terminal ou, si vous avez exécuté la commande en arrière-plan, dans le fichier de log **/var/log/centreon-bi/centreonBIETL.log** (par exemple, utilisez `tail -f /var/log/centreon-bi/centreonBIETL.log` pour la suivre). Vous devriez voir des lignes avec les 4 parties suivantes : ```shell 2025-08-01 13:34:16 - INFO - [SCHEDULER] >>>>>>> start @@ -1434,27 +1474,33 @@ Regardez le fichier de log **/var/log/centreon-bi/centreonBIETL.log** : vous dev ### Réactiver l'exécution quotidienne du script -Une fois le processus de reconstruction des données terminé, vous pouvez activer le calcul des -statistiques. -Sur le serveur de reporting, éditez le fichier **/etc/cron.d/centreon-bi-engine** et décommentez la ligne suivante : +> **Cette étape est obligatoire.** Le calcul quotidien des statistiques est désactivé par défaut. Si vous ignorez cette étape, aucune statistique quotidienne ne sera calculée, et aucune erreur ne sera affichée. -```shell -#30 4 * * * root /usr/share/centreon-bi/bin/centreonBIETL -d >> /var/log/centreon-bi/centreonBIETL.log 2>&1 -``` +Une fois le processus de reconstruction des données terminé, réactivez le calcul quotidien des statistiques : - - +1. Sur le serveur de reporting, éditez le fichier **/etc/cron.d/centreon-bi-engine** et décommentez la ligne suivante (supprimez le `#` initial) : -Redémarrez le service cron sur le serveur de reporting : + ```shell + #30 4 * * * root /usr/share/centreon-bi//bin/centreonBIETL -d >> /var/log/centreon-bi/centreonBIETL.log 2>&1 + ``` + + La ligne doit maintenant ressembler à ceci : + + ```shell + 30 4 * * * root /usr/share/centreon-bi//bin/centreonBIETL -d >> /var/log/centreon-bi/centreonBIETL.log 2>&1 + ``` + +2. Redémarrez le service cron sur le serveur de reporting : + + + ```shell systemctl restart crond ``` - - -Redémarrez le service cron sur le serveur de reporting : + ```shell systemctl restart cron diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-26.10/reporting/migrate.md b/i18n/fr/docusaurus-plugin-content-docs/version-26.10/reporting/migrate.md index 94e4bc9541ba..d2f158cb2292 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/version-26.10/reporting/migrate.md +++ b/i18n/fr/docusaurus-plugin-content-docs/version-26.10/reporting/migrate.md @@ -39,7 +39,7 @@ mysql_upgrade - Si des erreurs sont visibles, notamment sur les tables mysql innodb\_index\_stats, innodb\_table\_stats, gtid\_slave\_pos, cela peut être dû à une incompatibilité entre MySQL/MariaDB 5.5 et - MariaDB 10.11. Dans ce cas, effectuer les actions suivantes: + MariaDB 11.8. Dans ce cas, effectuer les actions suivantes: ```shell service mysql stop diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-26.10/reporting/update.md b/i18n/fr/docusaurus-plugin-content-docs/version-26.10/reporting/update.md index 94c4f2dd862c..ed309d118c3a 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/version-26.10/reporting/update.md +++ b/i18n/fr/docusaurus-plugin-content-docs/version-26.10/reporting/update.md @@ -18,7 +18,7 @@ La mise à jour de Centreon MBI se fait en 2 étapes : 1. Mettre à jour le paquet: se connecter sur le serveur Centreon et exécuter la commande suivante : - + ```shell dnf clean all @@ -26,7 +26,7 @@ dnf update centreon-bi-server ``` - + ```shell dnf clean all @@ -34,10 +34,11 @@ dnf update centreon-bi-server ``` - + ```shell apt clean +apt update apt --only-upgrade install centreon-bi\* ``` @@ -64,7 +65,7 @@ systemctl stop gorgoned Puis mettre à jour les paquets, en exécutant la commande suivante: - + ```shell dnf clean all @@ -72,7 +73,7 @@ dnf update centreon-bi\* ``` - + ```shell dnf clean all @@ -80,10 +81,11 @@ dnf update centreon-bi\* ``` - + ```shell apt clean +apt update apt --only-upgrade install centreon-bi\* ``` @@ -93,23 +95,24 @@ apt --only-upgrade install centreon-bi\* Vous devez également mettre à jour Centreon Gorgone : - + ```shell dnf update centreon-gorgone\* ``` - + ```shell dnf update centreon-gorgone\* ``` - + ```shell +apt update apt --only-upgrade install centreon-gorgone\* ``` diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-26.10/reporting/upgrade.md b/i18n/fr/docusaurus-plugin-content-docs/version-26.10/reporting/upgrade.md index 713905d795bf..2380878e1edd 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/version-26.10/reporting/upgrade.md +++ b/i18n/fr/docusaurus-plugin-content-docs/version-26.10/reporting/upgrade.md @@ -26,30 +26,67 @@ La montée de version de Centreon MBI se fait en 4 étapes : Voir [Introduction à la montée de version](../upgrade/introduction.md). -### Mettre à jour la clé de signature RPM - -Sous EL8, pour des raisons de sécurité, les clés utilisées pour signer les RPMs Centreon sont changées régulièrement. Le dernier changement a eu lieu le 14 octobre 2021. Lorsque vous mettez Centreon à jour depuis une version plus ancienne, vous devez suivre la [procédure de changement de clé](../security/key-rotation.md#installation-existante), afin de supprimer l'ancienne clé et d'installer la nouvelle. - ## Étape 1 : Montée de version du paquet -Lors d'une montée de version majeure (ex: 20.10.x à 25.10.x) il faut en premier lieu mettre à jour +Lors d'une montée de version majeure (ex: 20.10.x à 26.10.x) il faut en premier lieu mettre à jour le dépôt contenant les paquets. Vous trouverez ce dépôt depuis votre compte sur notre [platefome de support, à la page **Dépôts**](https://support.centreon.com/hc/fr/categories/10341239833105-D%C3%A9p%C3%B4ts). -## Étape 2 : Mettre à jour l'interface +Sur le serveur de reporting, vous devez également installer le dépôt standard 26.10 : -1. Mettre à jour le paquet: se connecter sur le serveur Centreon et exécuter la commande suivante : + + - - +```shell +dnf install -y dnf-plugins-core +dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/26.10/el9/centreon-26.10.repo +dnf clean all --enablerepo=* +``` + + + ```shell -dnf clean all -dnf update centreon-bi-server +dnf install -y dnf-plugins-core +dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/26.10/el10/centreon-26.10.repo +dnf clean all --enablerepo=* +``` + + + + +> Si votre serveur de reporting est encore sous Debian 12, n'utilisez pas cette procédure. Suivez plutôt [Mettre à jour Centreon et Debian (12 vers 13) sur le même serveur](../migrate/upgrade-debian-in-place.md#step-11-upgrade-your-mbi-server-if-applicable) : cette procédure met à jour Debian et Centreon MBI en même temps et bascule les dépôts standard, business et plugins vers **trixie**. + +Sur Debian 13, les dépôts doivent pointer vers **trixie**. La ligne du dépôt standard est : + +```text +deb [signed-by=/etc/apt/keyrings/centreon.asc] https://packages.centreon.com/apt-standard/ trixie-26.10-stable main +``` + +La ligne du dépôt Business fournie sur le portail du support doit également utiliser **trixie**. Exécutez les commandes suivantes pour ajouter le dépôt standard : + +```shell +install -d /etc/apt/keyrings +wget -O /etc/apt/keyrings/centreon.asc https://apt-key.centreon.com +echo "deb [signed-by=/etc/apt/keyrings/centreon.asc] https://packages.centreon.com/apt-standard/ $(lsb_release -sc)-26.10-stable main" | tee /etc/apt/sources.list.d/centreon-26.10-stable.list +apt update +``` + +Vérifiez que toutes les lignes des dépôts Centreon utilisent **trixie** : + +```shell +grep -h "packages.centreon.com" /etc/apt/sources.list.d/*.list ``` + + +## Étape 2 : Mettre à jour l'interface + +1. Mettre à jour le paquet: se connecter sur le serveur Centreon et exécuter la commande suivante : + + ```shell @@ -58,7 +95,7 @@ dnf update centreon-bi-server ``` - + ```shell apt clean @@ -75,28 +112,8 @@ apt install --only-upgrade centreon-bi-server ## Étape 3 : Mettre à jour le serveur de reporting ### Prérequis de la version Java - - > Assurez-vous qu'une version de Java 17 (ou 18) est installée avant de commencer la procédure. - - - Pour vérifier quelle version de Java est installée, entrez la commande suivante : - - ```shell - java -version - ``` - - - Pour une mise à jour de Java en version 17 (ou 18), allez sur la [page officielle de téléchargement d'Oracle](https://www.oracle.com/java/technologies/downloads/#java17). - - - Si plusieurs versions de Java sont installées, vous devez activer la bonne version. Affichez les versions installées avec la commande suivante puis sélectionnez la version 17 (ou 18) : - - ```shell - sudo update-alternatives --config java - ``` - - Puis redémarrez le service : - - ```shell - systemctl restart cbis - ``` + +La version 26.10 nécessite Java 25. Lors de la mise à jour des paquets MBI, java (OpenJDK 25) sera automatiquement installé en tant que dépendance, si nécessaire. Le service **cbis** utilise toujours **/usr/lib/jvm/java-25-openjdk** sur Alma / RHEL / Oracle Linux et **/usr/lib/jvm/java-25-openjdk-amd64** sur Debian 13. Une fois la mise à jour terminée, vous pouvez supprimer les paquets Java 17 hérités de la version 25.10, si aucune autre application du serveur ne les utilise. ### Procédure de montée de version @@ -111,31 +128,33 @@ Vous pouvez maintenant procéder à la montée de version : 2. Puis mettez à jour les paquets, en exécutant la commande suivante : - + ```shell -dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm +dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm dnf clean all -dnf update centreon-bi\* +dnf update -y centreon-bi\* centreon-perl-libs-common ``` - + ```shell -dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -dnf clean all -dnf update centreon-bi\* +apt clean +apt update +apt install -y --only-upgrade centreon-bi-reporting-server centreon-perl-libs-common ``` - - +Assurez-vous que le service **cron** est installé, activé et actif (il peut être absent sur les serveurs installés à l'origine sous Debian 12) : ```shell -apt clean -apt install --only-upgrade centreon-bi-reporting-server +apt install -y cron +systemctl enable --now cron +systemctl is-active cron ``` +La dernière commande doit renvoyer `active`. + @@ -161,7 +180,23 @@ apt install --only-upgrade centreon-bi-reporting-server 2. Voir [Mettre à jour MariaDB](../upgrade/upgrade-mariadb.md). -3. Démarrez le service **cbis** : + Sur Debian 13, si le paquet demande s'il faut remplacer `/etc/mysql/mariadb.conf.d/50-server.cnf`, conservez la version actuellement installée (répondez **N**). La version du paquet définit `bind-address = 127.0.0.1`, et le serveur central ne pourrait alors plus accéder à la base de données de reporting. + +3. Vérifiez que MariaDB fonctionne : + + ```shell + systemctl is-active mariadb + ``` + + La commande doit renvoyer `active`. Sur Debian 13, vérifiez également que MariaDB écoute toujours sur toutes les interfaces : + + ```shell + grep "^bind-address" /etc/mysql/mariadb.conf.d/50-server.cnf + ``` + + La valeur doit être `0.0.0.0`. Si elle est à `127.0.0.1`, remettez-la à `0.0.0.0` et redémarrez MariaDB avec `systemctl restart mariadb`. + +4. Démarrez le service **cbis** : ```shell systemctl start cbis diff --git a/versioned_docs/version-26.10/assets/reporting/installation/centreon-mysql.cnf b/versioned_docs/version-26.10/assets/reporting/installation/centreon-mysql.cnf new file mode 100644 index 000000000000..d5ee8ea23914 --- /dev/null +++ b/versioned_docs/version-26.10/assets/reporting/installation/centreon-mysql.cnf @@ -0,0 +1,54 @@ +[mysqld] +#datadir=/var/lib/mysql +#tmpdir = /var/lib/mysql/tmp +port = 3306 + +max_heap_table_size=512M +open_files_limit = 32000 +group_concat_max_len = 1M + +#By request( all engines) +tmp_table_size=512M +sort_buffer_size = 64M +join_buffer_size = 256M + +#During load or enable keys +bulk_insert_buffer_size = 1G +myisam_sort_buffer_size=1G + +table_open_cache = 2048 +thread_cache_size = 64 + +#Time out and linked problems +connect_timeout=28800 +innodb_lock_wait_timeout=28800 +wait_timeout=28800 +interactive_timeout=28800 +max_allowed_packet = 128M + +#Low query +slow_query_log=1 +slow_query_log_file=slow-queries.log +long_query_time=120 + +#At startup +key_buffer_size = 1G +innodb_buffer_pool_size = 1G + + +#Innob DB +innodb_stats_on_metadata=0 +innodb_flush_method=O_DIRECT +innodb_flush_log_at_trx_commit=2 +innodb_log_buffer_size=1G #taille buffer redo log +innodb_log_file_size=512M +innodb_file_per_table=1 +innodb_open_files=1024 +innodb_max_dirty_pages_pct=30 + + +[mysqld_safe] +log-error=/var/log/mysqld.log +pid-file=/var/run/mysqld/mysqld.pid +innodb_lock_wait_timeout=1500 + diff --git a/versioned_docs/version-26.10/assets/reporting/installation/centreon.cnf b/versioned_docs/version-26.10/assets/reporting/installation/centreon.cnf index cf63beaea6e9..2cb442c4dbe0 100644 --- a/versioned_docs/version-26.10/assets/reporting/installation/centreon.cnf +++ b/versioned_docs/version-26.10/assets/reporting/installation/centreon.cnf @@ -45,7 +45,6 @@ innodb_flush_method=O_DIRECT innodb_flush_log_at_trx_commit=2 innodb_log_buffer_size=1G #taille buffer redo log innodb_log_file_size=512M -innodb_log_files_in_group=3 innodb_file_per_table=1 innodb_open_files=1024 innodb_max_dirty_pages_pct=30 diff --git a/versioned_docs/version-26.10/installation/_database-repository.mdx b/versioned_docs/version-26.10/installation/_database-repository.mdx index 3ddc2e1ce6a4..a771c9328f1c 100644 --- a/versioned_docs/version-26.10/installation/_database-repository.mdx +++ b/versioned_docs/version-26.10/installation/_database-repository.mdx @@ -64,7 +64,7 @@ dnf install -y --setopt=install_weak_deps=False mysql-server ```shell -mysql_apt_config="mysql-apt-config_0.8.34-1_all.deb" +mysql_apt_config="mysql-apt-config_0.8.36-1_all.deb" curl -fJLO "https://dev.mysql.com/get/$mysql_apt_config" echo "mysql-apt-config mysql-apt-config/select-server select mysql-8.4-lts" | debconf-set-selections export DEBIAN_FRONTEND="noninteractive" diff --git a/versioned_docs/version-26.10/reporting/installation.md b/versioned_docs/version-26.10/reporting/installation.md index a5bd3b1e6a57..c1b11211ba7b 100644 --- a/versioned_docs/version-26.10/reporting/installation.md +++ b/versioned_docs/version-26.10/reporting/installation.md @@ -80,9 +80,9 @@ considerations. - + -- Centreon Web 25.10 +- Centreon Web 26.10 - Check that `date.timezone` is correctly configured in the `/etc/php.d/50-centreon.ini` or `/etc/php.d/20-timezone.ini` file (same as the one returned by the `timedatectl status` command). - Avoid using the following variables in the configuration file `/etc/my.cnf`. They interrupt the @@ -90,6 +90,8 @@ considerations. - wait_timeout - interactive_timeout + This only applies to the monitoring database. The [optimized configuration file](#optimize-the-database) of the reporting database sets these variables to 28800 seconds on purpose. + #### Users and groups | User | Group | @@ -98,9 +100,9 @@ considerations. | apache (existing) | centreonBI | - + -- Centreon Web 25.10 +- Centreon Web 26.10 - Check that `date.timezone` is correctly configured in the `/etc/php.d/50-centreon.ini` or `/etc/php.d/20-timezone.ini` file (same as the one returned by the `timedatectl status` command). - Avoid using the following variables in the configuration file `/etc/my.cnf`. They interrupt the @@ -108,6 +110,8 @@ considerations. - wait_timeout - interactive_timeout + This only applies to the monitoring database. The [optimized configuration file](#optimize-the-database) of the reporting database sets these variables to 28800 seconds on purpose. + #### Users and groups | User | Group | @@ -116,23 +120,25 @@ considerations. | apache (existing) | centreonBI | - + -- Centreon Web 25.10 -- Check that `date.timezone` is correctly configured in the `/etc/php/8.2/mods-available/centreon.ini` or `/etc/php/8.2/mods-available/timezone.ini` file +- Centreon Web 26.10 +- Check that `date.timezone` is correctly configured in the `/etc/php/8.4/mods-available/centreon.ini` or `/etc/php/8.4/mods-available/timezone.ini` file (same as the one returned by the `timedatectl status` command). - Avoid using the following variables in the configuration file `/etc/mysql/mariadb.cnf`. They interrupt the execution of long queries and can stop ETL or report generation jobs: - wait_timeout - interactive_timeout -- When creating the CentreonBI user, you must execute the following command: `adduser centreonBI --force-badname` + + This only applies to the monitoring database. The [optimized configuration file](#optimize-the-database) of the reporting database sets these variables to 28800 seconds on purpose. +- When creating the CentreonBI user, you must execute the following command: `adduser centreonBI --allow-bad-names` #### Users and groups | User | Group | |----------------------|------------------------------| | centreonBI (new) | www-data,centreon,centreonBI | -| apache (existing) | centreonBI | +| www-data (existing) | centreonBI | @@ -288,75 +294,37 @@ vgdisplay vg_data | grep -i free* - Firewalld: Disabled ([look here](../installation/installation-of-a-central-server/using-packages.md#configure-or-disable-the-firewall)) - SELinux: Disabled ([look here](../installation/installation-of-a-central-server/using-packages.md#disable-selinux)) -> Make sure that the reporting server and the central server have the same time zone; otherwise report publications will fail (the link to download them will be missing). -> The same time zone must be displayed with the `timedatectl` command. -> You can change the time zone with this command: -> ->```shell ->timedatectl set-timezone Europe/Paris ->``` - -Be sure to optimize MariaDB/MySQL on your reporting server. -You will need at least 12 GB of RAM in order to use the [following file](../assets/reporting/installation/centreon.cnf). - -> If you want to use a different directory than `/var/lib/mysql/`, edit the **datadir** and **tmpdir** variables in the centreon.cnf file. - -Make sure a **tmp** folder is created inside the same partition as **/var/lib/mysql**. - -> Do not set these MariaDB optimizations on your monitoring server. - -If you are using MySQL: +Make sure that the reporting server and the central server have the same time zone; otherwise report publications will fail (the link to download them will be missing). The `/etc/localtime` file must also exist on the reporting server; otherwise the `install.sh` script will fail to create the database schema. -1. Perform the following action: - - - - -In the `/etc/my.cnf.d/mysql-server.cnf` file, add: - -```shell -log_bin_trust_function_creators=1 -``` - - - +1. Set the time zone of the reporting server to the same time zone as the central server (for example, `Europe/Paris`): -In the `/etc/my.cnf.d/mysql-server.cnf` file, add: + ```shell + timedatectl set-timezone Europe/Paris + ``` -```shell -log_bin_trust_function_creators=1 -``` + If the central server uses UTC, use `Etc/UTC` rather than `UTC`. If the reporting server already reports UTC, `timedatectl set-timezone UTC` does nothing and does not create `/etc/localtime`. - - +2. Check that `/etc/localtime` exists and points to the right time zone: -In the `/etc/mysql/mysql.cnf` file, add: + ```shell + ls -l /etc/localtime + ``` -```shell -[mysqld] -log_bin_trust_function_creators=1 -``` + The output should look like this: `/etc/localtime -> ../usr/share/zoneinfo/Europe/Paris`. - - +Be sure to optimize MariaDB/MySQL on your reporting server. +You WILL need at least 12 GB of RAM in order to use the optimized configuration file. Without this, the database doesn't start. Download the file that matches your database: -2. Restart MySQL. +- MariaDB: [centreon.cnf](../assets/reporting/installation/centreon.cnf) +- MySQL: [centreon-mysql.cnf](../assets/reporting/installation/centreon-mysql.cnf) -3. Check the database to confirm this variable is applied: +You will save this file as `85-centreon-bi.cnf` when you [optimize the database](#optimize-the-database). Keep this name: the `85-` prefix makes sure the file is read after the `80-centreon.cnf` file installed by Centreon packages, so that its values are not overridden. -```shell -show global variables like 'log_bin_trust_function_creators'; -+---------------------------------+-------+ -| Variable_name | Value | -+---------------------------------+-------+ -| log_bin_trust_function_creators | ON | -``` +> If you want to use a different directory than `/var/lib/mysql/`, edit the **datadir** and **tmpdir** variables in the `85-centreon-bi.cnf` file. -If the variable is not turned on, set it manually: +Make sure a **tmp** folder is created inside the same partition as **/var/lib/mysql**. -```shell -mysql> SET GLOBAL log_bin_trust_function_creators = 1; -``` +> Do not set these MariaDB optimizations on your monitoring server. Users and groups: @@ -379,21 +347,21 @@ The actions listed in this chapter must be performed on the **Centreon Central S 2. Then run the following commands: - + ```shell dnf install centreon-bi-server ``` - + ```shell dnf install centreon-bi-server ``` - + Install **gpg**: @@ -420,9 +388,74 @@ apt install centreon-bi-server In the central database, grant trigger rights to the **centreon** user: +1. Find the host(s) on which the **centreon** user exists: + + ```shell + SELECT user, host FROM mysql.user WHERE user = 'centreon'; + ``` + +2. Grant the rights to the **centreon** user: + + ```shell + GRANT TRIGGER ON centreon.* TO 'centreon'@''; + GRANT TRIGGER ON centreon_storage.* TO 'centreon'@''; + ``` + + Replace **<host>** with the value returned by the previous query (for example, `localhost` if the database is local to the central server, or `%` or an IP address if it is remote). If the query returns several hosts, run these commands for each of them. + +### Allow function creation (MySQL only) + +If the central database uses MySQL, perform the following actions on the server that hosts it before you enable the extension. Otherwise, the installation fails with `ERROR 1419`: the extension appears as installed, but its menu and options are missing. + +1. Perform the following action: + + + + +In the `/etc/my.cnf.d/mysql-server.cnf` file, add: + +```shell +log_bin_trust_function_creators=1 +``` + + + + +In the `/etc/my.cnf.d/mysql-server.cnf` file, add: + +```shell +log_bin_trust_function_creators=1 +``` + + + + +Create the `/etc/mysql/conf.d/90-centreon-bi.cnf` file and add: + +```shell +[mysqld] +log_bin_trust_function_creators=1 +``` + + + + +2. Restart MySQL. + +3. Check the database to confirm this variable is applied: + ```shell -GRANT TRIGGER ON centreon.* TO `centreon`@'%'; -GRANT TRIGGER ON centreon_storage.* TO `centreon`@'%'; +show global variables like 'log_bin_trust_function_creators'; ++---------------------------------+-------+ +| Variable_name | Value | ++---------------------------------+-------+ +| log_bin_trust_function_creators | ON | +``` + +If the variable is not turned on, set it manually: + +```shell +mysql> SET GLOBAL log_bin_trust_function_creators = 1; ``` ### Enable the extension @@ -440,14 +473,17 @@ menu, *Reports > Monitoring Business Intelligence > General Options*: | Tabs | Option | Value | |----------------------------------------------------------------------------------------|----------------------------|--------------------------------------------------------------------------------------| | Scheduler options | CBIS Host | IP address of the reporting server | -| ETL options | Reporting engine uses a dedicated MySQL server | Yes | | -| Reporting widgets | Reporting MariaDB database | IP address of the reporting base (default = IP address of the reporting server) | +| ETL options | Reporting engine uses a dedicated MySQL server | Yes | +| Reporting widgets* | Reporting MariaDB database | IP address of the reporting base (default = IP address of the reporting server) | +| Reporting widgets* | Password | Password of the **centreonbi** database user on the reporting server | -\**The connection test will not work at this point in the installation*. +\* *The connection test will not work at this point in the installation.* -### Access to the Central database +> The **Password** field of the **Reporting widgets** tab is prefilled with **centreonbi**. This is not the password that the installation scripts (**centreonMysqlRights.pl** and **install.sh**) set for the **centreonbi** user. If you keep the default value, the widgets cannot connect to the reporting database, and the connection test fails with the following error: `Access denied for user 'centreonbi'@''`. -Download the license sent by the Centreon team to start configuring the general options. +The password can be updated in **Reporting > Monitoring Business Intelligence > General Options > Reporting widgets**. + +### Access to the Central database @@ -459,11 +495,15 @@ The MariaDB monitoring database is hosted on the central monitoring server. Run the command below to allow the reporting server to connect to the databases on the monitoring server. Use the following option: + ```shell -perl /usr/share/centreon/www/modules/centreon-bi-server/tools/centreonMysqlRights.pl --root-password=@ROOTPWD@ +perl /usr/share/centreon/www/modules/centreon-bi-server/tools/centreonMysqlRights.pl --root-password=@MYSQLROOTPASSWORD@ ``` -**@ROOTPWD@**: Root password of the MariaDB monitoring database. -If there is no password for the "root" user, do not specify the **root-password** option. + +This script will return the password for the CentreonBI user. +The password can be updated in **Reports > Monitoring Business Intelligence > General options > Reporting Widgets**. + +@MYSQLROOTPASSWORD@: The root password of the MariaDB monitoring database. If there is no password for the "root" user, do not specify the root-password option. @@ -475,11 +515,13 @@ Run the command below to allow the reporting server to connect to the databases Use the following option: ```shell -perl /usr/share/centreon/www/modules/centreon-bi-server/tools/centreonMysqlRights.pl --root-password=@ROOTPWD@ +perl /usr/share/centreon/www/modules/centreon-bi-server/tools/centreonMysqlRights.pl --root-password=@MYSQLROOTPASSWORD@ ``` -**@ROOTPWD@**: Root password of the MySQL monitoring database. -If there is no password for the "root" user, do not specify the **root-password** option. +This script will return the password for the CentreonBI user. +The password can be updated in **Reports > Monitoring Business Intelligence > General options > Reporting Widgets**. + +@MYSQLROOTPASSWORD@: The root password of the MariaDB monitoring database. If there is no password for the "root" user, do not specify the root-password option. @@ -528,7 +570,7 @@ GRANT ALL PRIVILEGES ON centreon_storage.* TO 'centreonbi'@'$BI_ENGINE_IP$'; If you use MariaDB replication for your **monitoring databases**, some views are created during the installation of Centreon MBI. You must exclude them from replication by adding the following line to the **my.cnf** -file of the slave server or mariadb.cnf on Debian 12. +file of the slave server or mariadb.cnf on Debian 13. ```shell replicate-wild-ignore-table=centreon.mod_bi_%v01,centreon.mod_bi_%V01 ``` @@ -538,7 +580,7 @@ Then, create the views manually on the slave server: ```bash mysql centreon < /tmp/view_creation.sql ``` -#### Debian 12 specific configuration +#### Debian 13 specific configuration MariaDB must listen on all interfaces instead of listening on localhost/127.0.0.1 (default value). Edit the following file: ```shell /etc/mysql/mariadb.conf.d/50-server.cnf @@ -554,7 +596,7 @@ systemctl restart mariadb If you use MySQL replication for your **monitoring databases**, some views are created during the installation of Centreon MBI. You must exclude them from replication by adding the following line to the **my.cnf** -file of the slave server or mysql.cnf on Debian 12. +file of the slave server. On Debian 13, add it to the **[mysqld]** section of a file inside `/etc/mysql/conf.d/` (for example `/etc/mysql/conf.d/centreon.cnf`). ```shell replicate-wild-ignore-table=centreon.mod_bi_%v01,centreon.mod_bi_%V01 @@ -570,15 +612,16 @@ Then, create the views manually on the slave server: mysql centreon < /tmp/view_creation.sql ``` -#### Debian 12 specific configuration +#### Debian 13 specific configuration -MySQL must listen on all interfaces instead of listening on localhost/127.0.0.1 (default value). Edit the following file: +MySQL must listen on all interfaces instead of listening on localhost/127.0.0.1 (default value). Add the following lines to a file inside `/etc/mysql/conf.d/` (for example `/etc/mysql/conf.d/centreon.cnf`): ```shell -/etc/mysql/mysql.conf.d/mysqld.cnf +[mysqld] +bind-address=0.0.0.0 ``` -Set **bind-address** to **0.0.0.0** and restart **mysql**. +Then restart **mysql**. ```shell systemctl restart mysql @@ -640,45 +683,51 @@ During database installation, note the password for the database's **root** acco 1. Install the standard repository: - + ```shell dnf install -y dnf-plugins-core -dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/25.10/el8/centreon-25.10.repo +dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/26.10/el9/centreon-26.10.repo dnf clean all --enablerepo=* dnf update ``` - + ```shell dnf install -y dnf-plugins-core -dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/25.10/el9/centreon-25.10.repo +dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/26.10/el10/centreon-26.10.repo dnf clean all --enablerepo=* dnf update ``` - + Install the required packages: ```shell -apt install lsb-release ca-certificates apt-transport-https software-properties-common wget gnupg2 +apt update && apt install -y lsb-release ca-certificates apt-transport-https wget gnupg2 curl cron +systemctl enable --now cron ``` -Install the Centreon repositories: +Check that the **cron** service is active: ```shell -echo "deb https://packages.centreon.com/apt-standard/ $(lsb_release -sc)-25.10-stable main" | tee -a /etc/apt/sources.list.d/centreon-25.10-stable.list -echo "deb https://packages.centreon.com/apt-plugins-stable/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/centreon-plugins.list +systemctl is-active cron ``` -Then import the repository key: +The command must return `active`. + +Install the Centreon repositories: ```shell -wget -O- https://apt-key.centreon.com | gpg --dearmor | tee /etc/apt/trusted.gpg.d/centreon.gpg > /dev/null 2>&1 +install -d /etc/apt/keyrings +wget -O /etc/apt/keyrings/centreon.asc https://apt-key.centreon.com + +echo "deb [signed-by=/etc/apt/keyrings/centreon.asc] https://packages.centreon.com/apt-standard/ $(lsb_release -sc)-26.10-stable main" | tee /etc/apt/sources.list.d/centreon-26.10-stable.list +echo "deb [signed-by=/etc/apt/keyrings/centreon.asc] https://packages.centreon.com/apt-plugins-stable/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/centreon-plugins.list apt update ``` @@ -694,27 +743,27 @@ apt update #### Install dependencies - + Install the **epel** repository: ```shell -dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm +dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm ``` Enable the **codeready-builder** repositories: ```shell -subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms +subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms ``` - + Install the **epel** repository: ```shell -dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm +dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm ``` Enable the **codeready-builder** repositories: @@ -724,55 +773,55 @@ dnf config-manager --set-enabled ol8_codeready_builder ``` - + Install the **epel** repository: ```shell -dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm +dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm ``` -Enable the **powertools** repository: +Enable the **crb** repository: ```shell -dnf config-manager --set-enabled 'powertools' +dnf config-manager --set-enabled 'crb' ``` - + Install the **epel** repository: ```shell -dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm +dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm ``` Enable the **codeready-builder** repositories: ```shell -subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms +subscription-manager repos --enable codeready-builder-for-rhel-10-x86_64-rpms ``` - + Install the **epel** repository: ```shell -dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm +dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm ``` Enable the **codeready-builder** repositories: ```shell -dnf config-manager --set-enabled ol9_codeready_builder +dnf config-manager --set-enabled ol10_codeready_builder ``` - + Install the **epel** repository: ```shell -dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm +dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm ``` Run the following command: @@ -782,7 +831,7 @@ dnf config-manager --set-enabled 'crb' ``` - + No dependencies need to be installed. @@ -794,21 +843,21 @@ No dependencies need to be installed. - + ```shell dnf install MariaDB-server MariaDB-client ``` - + ```shell dnf install MariaDB-server MariaDB-client ``` - + ```shell apt update @@ -823,10 +872,10 @@ apt install mariadb-server mariadb-client - + ```shell -dnf install https://dev.mysql.com/get/mysql84-community-release-el8-1.noarch.rpm +dnf install https://dev.mysql.com/get/mysql84-community-release-el9-1.noarch.rpm dnf config-manager --enable mysql-8.4-lts-community dnf module disable mysql dnf install mysql-community-server @@ -834,7 +883,7 @@ systemctl start mysqld ``` - + ```shell dnf install -y mysql-server mysql @@ -844,18 +893,14 @@ echo "default-authentication-plugin=mysql_native_password" >> /etc/my.cnf.d/mysq systemctl daemon-reload systemctl restart mysqld systemctl list-units --type=service | grep -i mysql -sudo sed -Ei 's/LimitNOFILE\s*=\s*[0-9]+/LimitNOFILE = 32000/' /usr/lib/systemd/system/mysqld -sudo systemctl start mysqld -sudo systemctl status mysqld ``` - + ```shell apt update apt install -y centreon-mysql -# Sélectionner "Use Legacy Authentication Method" systemctl daemon-reload systemctl restart mysql ``` @@ -869,22 +914,21 @@ systemctl restart mysql #### Install the MBI module on the MBI server - + ```shell -echo "deb https://packages.centreon.com/apt-standard/ $(lsb_release -sc)-25.10-stable main" | tee -a /etc/apt/sources.list.d/centreon-25.10-stable.list dnf install centreon-bi-reporting-server ``` - + ```shell dnf install centreon-bi-reporting-server ``` - + ```shell apt update @@ -894,21 +938,7 @@ apt install centreon-bi-reporting-server -Then, ensure a version of Java 17 (or 18) is installed before you start the procedure. - - - If you need to check the Java version, enter the following command: - - ```shell - java -version - ``` - - - If you need to upgrade the Java installation to Java 17 (or 18), go to the [Oracle official download](https://www.oracle.com/java/technologies/downloads/#java17) page. - - - If several Java versions are installed, you need to activate the right version. Display the installed versions using the following command and select the Java 17 (or 18) version: - - ```shell - sudo update-alternatives --config java - ``` +When installing the MBI packages, java (OpenJDK 25) is automatically installed as a dependency, if needed. The **cbis** service always uses **/usr/lib/jvm/java-25-openjdk** on Alma / RHEL / Oracle Linux and **/usr/lib/jvm/java-25-openjdk-amd64** on Debian 13. #### Enable services @@ -929,10 +959,10 @@ systemctl start gorgoned && systemctl enable gorgoned - + -Make sure that the optimized configuration [file](../assets/reporting/installation/centreon.cnf) provided -in the prerequisites is present in `/etc/my.cnf.d/`, then restart the MariaDB service: +Copy the [optimized configuration file](../assets/reporting/installation/centreon.cnf) provided +in the prerequisites to `/etc/my.cnf.d/85-centreon-bi.cnf`, then restart the MariaDB service: ```shell systemctl restart mariadb @@ -964,10 +994,10 @@ socket=$PATH_TO_SOCKET$ ``` - + -Make sure that the optimized configuration [file](../assets/reporting/installation/centreon.cnf) provided -in the prerequisites is present in `/etc/my.cnf.d/`, then restart the MariaDB service: +Copy the [optimized configuration file](../assets/reporting/installation/centreon.cnf) provided +in the prerequisites to `/etc/my.cnf.d/85-centreon-bi.cnf`, then restart the MariaDB service: ```shell systemctl restart mariadb @@ -999,16 +1029,10 @@ socket=$PATH_TO_SOCKET$ ``` - - -Make sure that the optimized configuration [file](../assets/reporting/installation/centreon.cnf) -provided in the requirements is present in `/etc/mysql/mariadb.conf.d/`. + -Rename the file to `80-centreon.cnf`: - -```shell -mv centreon.cnf 80-centreon.cnf -``` +Copy the [optimized configuration file](../assets/reporting/installation/centreon.cnf) +provided in the prerequisites to `/etc/mysql/mariadb.conf.d/85-centreon-bi.cnf`. MariaDB should listen to all interfaces instead of localhost/127.0.0.1, which is the default. Edit the following file: @@ -1052,9 +1076,9 @@ socket=$PATH_TO_SOCKET$ - + -Ensure that the [optimized configuration file](../assets/reporting/installation/centreon.cnf) provided in the prerequisites is present in `/etc/my.cnf.d/`, then restart the MySQL service: +Copy the [optimized configuration file](../assets/reporting/installation/centreon-mysql.cnf) provided in the prerequisites to `/etc/my.cnf.d/85-centreon-bi.cnf`, then restart the MySQL service: ```shell systemctl restart mysql @@ -1066,7 +1090,7 @@ You must modify the **LimitNOFILE** limitation. Changing this option in `/etc/my mkdir -p /etc/systemd/system/mysql.service.d/ echo -ne "[Service]\nLimitNOFILE=32000\n" | tee /etc/systemd/system/mysql.service.d/limits.conf systemctl daemon-reload -systemctl restart mysql +systemctl enable mysql ``` If the MySQL service fails to start, delete the *ib_logfile* files (MySQL MUST be stopped) and then restart MySQL again: @@ -1083,21 +1107,11 @@ socket=$PATH_TO_SOCKET$ ``` - + -Ensure that the [optimized configuration file](../assets/reporting/installation/centreon.cnf) provided in the prerequisites is present in `/etc/my.cnf.d/`, then restart the MySQL service: - - -```shell -systemctl restart mysql -``` - -You must modify the **LimitNOFILE** limitation. Changing this option in `/etc/my.cnf` will NOT work. +Copy the [optimized configuration file](../assets/reporting/installation/centreon-mysql.cnf) provided in the prerequisites to `/etc/my.cnf.d/85-centreon-bi.cnf`, then restart the MySQL service: ```shell -mkdir -p /etc/systemd/system/mysql.service.d/ -echo -ne "[Service]\nLimitNOFILE=32000\n" | tee /etc/systemd/system/mysql.service.d/limits.conf -systemctl daemon-reload systemctl restart mysql ``` @@ -1115,35 +1129,30 @@ socket=$PATH_TO_SOCKET$ ``` - + -Ensure that the [optimized configuration file](../assets/reporting/installation/centreon.cnf) provided in the prerequisites is present in `/etc/mysql/mysql.conf.d/`. +Copy the [optimized configuration file](../assets/reporting/installation/centreon-mysql.cnf) provided in the prerequisites to `/etc/mysql/conf.d/85-centreon-bi.cnf`. Do not name it `80-centreon.cnf`: this would overwrite the file installed by the **centreon-mysql** package. -Rename the file as `80-centreon.cnf`: +MySQL must listen to all interfaces instead of localhost/127.0.0.1, which is the default value. Add the following lines to a file inside `/etc/mysql/conf.d/` (for example `/etc/mysql/conf.d/centreon.cnf`): ```shell -mv centreon.cnf 80-centreon.cnf -``` - -MySQL must listen to all interfaces instead of localhost/127.0.0.1, which is the default value. Edit the following file: - -```shell -/etc/mysql/mysql.conf.d/mysqld.cnf +[mysqld] +bind-address=0.0.0.0 ``` -Set the **bind-address** parameter to **0.0.0.0** and restart mysql. +Then restart mysql. ```shell systemctl restart mysql ``` -You must modify the **LimitNOFILE** limitation. Changing this option in `/etc/my.cnf` will NOT work. +You must modify the **LimitNOFILE** limitation. Changing this option in the MySQL configuration files (`/etc/mysql/my.cnf` or `/etc/mysql/conf.d/`) will NOT work. ```shell mkdir -p /etc/systemd/system/mysql.service.d/ echo -ne "[Service]\nLimitNOFILE=32000\n" | tee /etc/systemd/system/mysql.service.d/limits.conf systemctl daemon-reload -systemctl restart mysql +systemctl enable mysql ``` If the MySQL service fails to start, delete the *ib_logfile* files (MySQL MUST be stopped) and then restart MySQL again: @@ -1153,7 +1162,7 @@ rm -f /var/lib/mysql/ib_logfile* systemctl start mysql ``` -If you are using a specific socket file for MySQL, edit the `/etc/my.cnf` file and add the following to the [client] section: +If you are using a specific socket file for MySQL, add the following to the [client] section of a file inside `/etc/mysql/conf.d/` (for example `/etc/mysql/conf.d/centreon.cnf`): ```shell socket=$PATH_TO_SOCKET$ @@ -1168,7 +1177,7 @@ socket=$PATH_TO_SOCKET$ ### Secure the database It is mandatory to secure the root access of the database before installing Centreon. -If you use a local database, execute the following command on the central server, otherwise on the database server: +Execute the following commands on the reporting server: @@ -1177,17 +1186,43 @@ If you use a local database, execute the following command on the central server mariadb-secure-installation ``` +Answer **yes** to all questions except "Disallow root login remotely?" + -```shell -mysql_secure_installation -``` +1. Define the password you want for the database **root** user (replace **my_password** by your own in the following command): + + ```shell + db_root_password='my_password' + mysql_root_auth=(--ssl-mode=DISABLED -u root) + if ! mysql --ssl-mode=DISABLED -u root -e "SELECT 1" >/dev/null 2>&1; then + mysql_temp_pw=$(grep 'temporary password is generated for root@localhost' /var/log/mysqld.log \ + 2>/dev/null | tail -1 | sed -E 's/.*root@localhost: //') + if [ -z "$mysql_temp_pw" ]; then + echo "Could not authenticate to MySQL as root" >&2 + exit 1 + fi + mysql_root_auth=(--ssl-mode=DISABLED --connect-expired-password -u root -p"${mysql_temp_pw}") + fi + ``` + +2. Then replace the default autogenerated password with yours: + + ```shell + mysql "${mysql_root_auth[@]}" --verbose < -- Answer **yes** to all questions except "Disallow root login remotely?" - It is mandatory to define a password for the **root** user of the database. You will need this password during the [web-installation](../installation/web-and-post-installation.md). > See advanced procedures to [Secure your MBI platform](../reporting/secure-your-mbi-platform.md). @@ -1196,7 +1231,7 @@ mysql_secure_installation #### Start configuring -Make sure the MariaDB reporting system is started and then run the commands below and answer the questions: +Make sure the MariaDB reporting system is started and then run the commands below and answer the questions. For the "database type for reporting databse" select MySQL or MariaDB, do not leave the default option "Automatic Discovery" as this will result in an error. ```shell /usr/share/centreon-bi/config/install.sh @@ -1209,7 +1244,7 @@ Once the installation is complete, continue to the next chapter to configure the #### Problem with the SSH exchange key -In some cases, SSH key exchange fails. +In some cases, SSH key exchange fails, for example when password authentication is disabled on the monitoring server (`PasswordAuthentication no` in `/etc/ssh/sshd_config`). To solve the problem, do the following manually: Switch to the `centreonBI` user: @@ -1233,10 +1268,10 @@ cat /home/centreonBI/.ssh/id_ed25519.pub Now, **on the monitoring server**: -Create a `.ssh` folder that `centreonBI` will own, restrict permissions on this folder and paste into the `authorized_keys` file the contents of its public key on the reporting server (shown earlier): +Create a `.ssh` folder that `centreonBI` will own, restrict permissions on this folder and on the `authorized_keys` file, and paste into the `authorized_keys` file the contents of its public key on the reporting server (shown earlier): ```bash -mkdir -p /home/centreonBI/.ssh/ && chown centreonBI: /home/centreonBI/.ssh/ && chmod 700 /home/centreonBI/.ssh/ && echo "@reporting pub key content@" > /home/centreonBI/.ssh/authorized_keys +mkdir -p /home/centreonBI/.ssh/ && chown centreonBI: /home/centreonBI/.ssh/ && chmod 700 /home/centreonBI/.ssh/ && echo "@reporting pub key content@" > /home/centreonBI/.ssh/authorized_keys && chown centreonBI: /home/centreonBI/.ssh/authorized_keys && chmod 600 /home/centreonBI/.ssh/authorized_keys ``` The key exchange must then be validated by a first connection that will accept the SSH server signature. @@ -1249,7 +1284,6 @@ ssh centreonBI@@MONITORING_SERVER@ Then exit the `centreonBI` session with `exit` or `Ctrl-D` on both servers. To continue, run the installation script (`/usr/share/centreon-bi/config/install.sh`) as above and answer **Yes** when asked to proceed with the SSH key exchange. -You will get an error when creating the USER, because it already exists. This is not a blocking step. ## Step 4: Configure the ETL @@ -1335,7 +1369,7 @@ Avoid scheduled periods for statistical calculations with Centreon MBI ETL and r You can run this cron daily or weekly, depending on the batch execution time and the load generated on the server. - + Restart the cron service: @@ -1344,7 +1378,7 @@ systemctl restart crond ``` - + Restart the cron service: @@ -1371,24 +1405,23 @@ systemctl restart cron * Configure the ETL and enable data retention so that only the required data is imported and calculated. * Make sure that [the data on the central server is ready](how-mbi-works.md#phase-1-data-is-prepared-by-the-central-server). * Make sure that the **gorgoned** process works fine: `systemctl status gorgoned`. If needed, restart it: `systemctl restart gorgoned`. -* Bear in mind that if you are building the MBI database for the first time, you have to import all of the data in one go. If you have a large amount of data and/or if you start the process late in the day, it's important to be aware that the database building phase might take a significant amount of time, possibly extending into the next day. In this case, you need to disable the daily build [temporarily](#reenable-daily-script-execution), until the initial build is complete, so as to avoid duplicate entries or other problems. - 1. Edit the **/etc/cron.d/centreon-bi-engine** cronfile and comment out the following line: +* Bear in mind that if you are building the MBI database for the first time, you have to import all of the data in one go. If you have a large amount of data and/or if you start the process late in the day, it's important to be aware that the database building phase might take a significant amount of time, possibly extending into the next day. This is why the daily build is disabled by default: in the **/etc/cron.d/centreon-bi-engine** cronfile, the following line is commented out. It must stay commented out until the initial build is complete, so as to avoid duplicate entries or other problems. You will [reenable it](#reenable-daily-script-execution) at the end of the procedure. - ```shell - #30 4 * * * root /usr/share/centreon-bi/bin/centreonBIETL -d >> /var/log/centreon-bi/centreonBIETL.log 2>&1 - ``` + ```shell + #30 4 * * * root /usr/share/centreon-bi//bin/centreonBIETL -d >> /var/log/centreon-bi/centreonBIETL.log 2>&1 + ``` - 2. Restart **crond**. + If this line is not commented out (for example, if you are rebuilding the database), comment it out, then restart the cron service: - + ```shell systemctl restart crond ``` - + ```shell systemctl restart cron @@ -1416,7 +1449,7 @@ You may want to run it in the background and redirect the script's output to a l nohup /usr/share/centreon-bi//bin/centreonBIETL -r >> /var/log/centreon-bi/centreonBIETL.log 2>&1 & ``` -Go to the **/var/log/centreon-bi/centreonBIETL.log** log file: you should see some lines appear with 4 parts like: +The output is displayed in your terminal or, if you ran the command in the background, in the **/var/log/centreon-bi/centreonBIETL.log** log file (for example, use `tail -f /var/log/centreon-bi/centreonBIETL.log` to follow it). You should see some lines appear with 4 parts like: ```shell 2025-08-01 13:34:16 - INFO - [SCHEDULER] >>>>>>> start @@ -1437,25 +1470,33 @@ Go to the **/var/log/centreon-bi/centreonBIETL.log** log file: you should see so ### Reenable daily script execution -Once the data building process is complete, you can reenable the daily calculation of statistics. +> **This step is mandatory.** The daily calculation of statistics is disabled by default. If you skip this step, no daily statistics will be calculated, and no error will be displayed. -1. On the reporting server, edit the **/etc/cron.d/centreon-bi-engine** file and uncomment the following line: +Once the data building process is complete, reenable the daily calculation of statistics: + +1. On the reporting server, edit the **/etc/cron.d/centreon-bi-engine** file and uncomment the following line (remove the leading `#`): + + ```shell + #30 4 * * * root /usr/share/centreon-bi//bin/centreonBIETL -d >> /var/log/centreon-bi/centreonBIETL.log 2>&1 + ``` + + The line should now look like this: ```shell - #30 4 * * * root /usr/share/centreon-bi/bin/centreonBIETL -d >> /var/log/centreon-bi/centreonBIETL.log 2>&1 + 30 4 * * * root /usr/share/centreon-bi//bin/centreonBIETL -d >> /var/log/centreon-bi/centreonBIETL.log 2>&1 ``` 2. Restart the cron service on the reporting server: - + ```shell systemctl restart crond ``` - + ```shell systemctl restart cron @@ -1464,6 +1505,8 @@ systemctl restart cron +> Make sure the **centreonBIETL** batch only starts once **eventReportBuilder** has ended on the monitoring server (check the cron file **etc/cron.d/centreon** on the monitoring server). + The installation of Centreon MBI is now complete. You can start creating [jobs](concepts.md#jobs) in order to generate reports. See [the tutorial](../getting-started/analyze-resources-availability.md). ## Monitor your MBI server with Centreon diff --git a/versioned_docs/version-26.10/reporting/migrate.md b/versioned_docs/version-26.10/reporting/migrate.md index ea8b43fe0ed0..8104c37509e7 100644 --- a/versioned_docs/version-26.10/reporting/migrate.md +++ b/versioned_docs/version-26.10/reporting/migrate.md @@ -39,7 +39,7 @@ mysql_upgrade - If you see errors, especially on the following tables mysql innodb_index_stats, innodb_table_stats, gtid_slave_pos, it might be caused by an incompatibility between MySQL/MariaDB 5.5 and - MariaDB 10.11. In that case, follow the procedure below: + MariaDB 11.8. In that case, follow the procedure below: ```shell service mysql stop diff --git a/versioned_docs/version-26.10/reporting/update.md b/versioned_docs/version-26.10/reporting/update.md index 22a67f32f65f..e5ea4d71183c 100644 --- a/versioned_docs/version-26.10/reporting/update.md +++ b/versioned_docs/version-26.10/reporting/update.md @@ -18,7 +18,7 @@ Centreon MBI is updated in two steps: 1. Update the package, run the following commands: - + ```shell dnf clean all @@ -26,7 +26,7 @@ dnf update centreon-bi-server ``` - + ```shell dnf clean all @@ -34,10 +34,11 @@ dnf update centreon-bi-server ``` - + ```shell apt clean +apt update apt --only-upgrade install centreon-bi\* ``` @@ -65,7 +66,7 @@ systemctl stop gorgoned Then run the following commands: : - + ```shell dnf clean all @@ -73,7 +74,7 @@ dnf update centreon-bi\* ``` - + ```shell dnf clean all @@ -81,10 +82,11 @@ dnf update centreon-bi\* ``` - + ```shell apt clean +apt update apt --only-upgrade install centreon-bi\* ``` @@ -94,23 +96,24 @@ apt --only-upgrade install centreon-bi\* You also need to update Centreon Gorgone: - + ```shell dnf update centreon-gorgone\* ``` - + ```shell dnf update centreon-gorgone\* ``` - + ```shell +apt update apt --only-upgrade install centreon-gorgone\* ``` diff --git a/versioned_docs/version-26.10/reporting/upgrade.md b/versioned_docs/version-26.10/reporting/upgrade.md index d870968993b0..77714636cb72 100644 --- a/versioned_docs/version-26.10/reporting/upgrade.md +++ b/versioned_docs/version-26.10/reporting/upgrade.md @@ -26,29 +26,66 @@ The upgrade of Centreon MBI consists of four steps: See [Introduction to upgrade](../upgrade/introduction.md). -### Update the RPM signing key - -On EL8, for security reasons, the keys used to sign Centreon RPMs are rotated regularly. The last change occurred on October 14, 2021. When upgrading from an older version, you need to go through the [key rotation procedure](../security/key-rotation.md#existing-installation) to remove the old key and install the new one. - ## Step 1: Update the repository -When you upgrade from a previous major version to 25.10.x, you first need to update the repository on your Central & Reporting servers. +When you upgrade from a previous major version to 26.10.x, you first need to update the repository on your Central & Reporting servers. You will find the new "Business" repository on the "Repositories" page in your [Centreon Support account](https://support.centreon.com/hc/en-us/categories/10341239833105-Repositories). -## Step 2: Upgrade the extension interface +On the reporting server, you also need to install the 26.10 standard repository: -1. Update the package, run the following commands: + + - - +```shell +dnf install -y dnf-plugins-core +dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/26.10/el9/centreon-26.10.repo +dnf clean all --enablerepo=* +``` + + + ```shell -dnf clean all -dnf update centreon-bi-server +dnf install -y dnf-plugins-core +dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/26.10/el10/centreon-26.10.repo +dnf clean all --enablerepo=* +``` + + + + +> If your reporting server still runs Debian 12, do not use this procedure. Follow [Upgrading Centreon and Debian (12 to 13) on the same server](../migrate/upgrade-debian-in-place.md#step-11-upgrade-your-mbi-server-if-applicable) instead: it upgrades Debian and Centreon MBI together and switches the standard, business and plugins repositories to **trixie**. + +On Debian 13, the repositories must point to **trixie**. The standard repository line is: + +```text +deb [signed-by=/etc/apt/keyrings/centreon.asc] https://packages.centreon.com/apt-standard/ trixie-26.10-stable main +``` + +The Business repository line you get from the support portal must also use **trixie**. Run the following commands to add the standard repository: + +```shell +install -d /etc/apt/keyrings +wget -O /etc/apt/keyrings/centreon.asc https://apt-key.centreon.com +echo "deb [signed-by=/etc/apt/keyrings/centreon.asc] https://packages.centreon.com/apt-standard/ $(lsb_release -sc)-26.10-stable main" | tee /etc/apt/sources.list.d/centreon-26.10-stable.list +apt update +``` + +Check that all Centreon repository lines use **trixie**: + +```shell +grep -h "packages.centreon.com" /etc/apt/sources.list.d/*.list ``` + + +## Step 2: Upgrade the extension interface + +1. Update the package, run the following commands: + + ```shell @@ -57,7 +94,7 @@ dnf update centreon-bi-server ``` - + ```shell apt clean @@ -75,28 +112,8 @@ Update button to update the extension and the widgets. ## Step 3: Upgrade the reporting server ### Java version requirement - - > Ensure a version of Java 17 (or 18) is installed before you start the procedure. - - - If you need to check the Java version, enter the following command: - - ```shell - java -version - ``` - - - If you need to upgrade the Java installation to Java 17 (or 18), go to the [Oracle official download](https://www.oracle.com/java/technologies/downloads/#java17) page. - - - If several Java versions are installed, you need to activate the right version. Display the installed versions using the following command and select the Java 17 (or 18) version: - - ```shell - sudo update-alternatives --config java - ``` - - Then restart the service: - - ```shell - systemctl restart cbis - ``` + +Version 26.10 requires Java 25. When upgrading the MBI packages, java (OpenJDK 25) is automatically installed as a dependency, if needed. The **cbis** service always uses **/usr/lib/jvm/java-25-openjdk** on Alma / RHEL / Oracle Linux and **/usr/lib/jvm/java-25-openjdk-amd64** on Debian 13. Once the upgrade is complete, you can remove the Java 17 packages left over from version 25.10, if no other application on the server uses them. ### Upgrade procedure @@ -111,31 +128,33 @@ Now you can start the upgrade process: 2. Then run the following commands: - + ```shell -dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm +dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm dnf clean all -dnf update centreon-bi\* +dnf update -y centreon-bi\* centreon-perl-libs-common ``` - + ```shell -dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -dnf clean all -dnf update centreon-bi\* +apt clean +apt update +apt install -y --only-upgrade centreon-bi-reporting-server centreon-perl-libs-common ``` - - +Make sure the **cron** service is installed, enabled and active (it may be missing on servers originally installed on Debian 12): ```shell -apt clean -apt install --only-upgrade centreon-bi-reporting-server +apt install -y cron +systemctl enable --now cron +systemctl is-active cron ``` +The last command must return `active`. + @@ -161,7 +180,23 @@ apt install --only-upgrade centreon-bi-reporting-server 2. See [Upgrading MariaDB](../upgrade/upgrade-mariadb.md). -3. Start the **cbis** service: + On Debian 13, if the package asks whether to replace `/etc/mysql/mariadb.conf.d/50-server.cnf`, keep your currently installed version (answer **N**). The package version sets `bind-address = 127.0.0.1`, and the central server would then no longer be able to reach the reporting database. + +3. Check that MariaDB is running: + + ```shell + systemctl is-active mariadb + ``` + + The command must return `active`. On Debian 13, also check that MariaDB still listens on all interfaces: + + ```shell + grep "^bind-address" /etc/mysql/mariadb.conf.d/50-server.cnf + ``` + + The value must be `0.0.0.0`. If it is `127.0.0.1`, set it back to `0.0.0.0` and restart MariaDB with `systemctl restart mariadb`. + +4. Start the **cbis** service: ```shell systemctl start cbis