From 0d32f8cd94cc404f24f17999fa1fb14e9effb950 Mon Sep 17 00:00:00 2001 From: Laurent Pinsivy Date: Fri, 29 Nov 2019 11:58:32 +0100 Subject: [PATCH 01/12] enh(core): remove non mandatory inst*.conf usage --- .../Infrastructure/Service/CentcoreConfigService.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Centreon/Infrastructure/Service/CentcoreConfigService.php b/src/Centreon/Infrastructure/Service/CentcoreConfigService.php index d4929074728..604ea528d6f 100644 --- a/src/Centreon/Infrastructure/Service/CentcoreConfigService.php +++ b/src/Centreon/Infrastructure/Service/CentcoreConfigService.php @@ -4,8 +4,6 @@ class CentcoreConfigService { - const CONF_CORE = 'instCentCore.conf'; - const CONF_PLUGINS = 'instCentPlugins.conf'; const CONF_WEB = 'instCentWeb.conf'; const MACROS_DELIMITER_TEMPLATE = '@%s@'; @@ -48,11 +46,7 @@ public function replaceMacros(&$string): void private function initMacros(): void { - $data = array_merge( - $this->parseIniFile(_CENTREON_ETC_ . '/' . static::CONF_CORE), - $this->parseIniFile(_CENTREON_ETC_ . '/' . static::CONF_PLUGINS), - $this->parseIniFile(_CENTREON_ETC_ . '/' . static::CONF_WEB) - ); + $data = $this->parseIniFile(_CENTREON_ETC_ . '/' . static::CONF_WEB); $this->macros = [ 'centreon_dir' => "{$data['INSTALL_DIR_CENTREON']}/", From f22973cb9ea8ce9b918351b1eaa0dc3828434b4b Mon Sep 17 00:00:00 2001 From: Laurent Pinsivy Date: Fri, 29 Nov 2019 13:46:57 +0100 Subject: [PATCH 02/12] enh(doc): remove unsused instCent*.conf files --- doc/en/faq/remote_server.rst | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/doc/en/faq/remote_server.rst b/doc/en/faq/remote_server.rst index aca17e23277..05a3ff721c4 100644 --- a/doc/en/faq/remote_server.rst +++ b/doc/en/faq/remote_server.rst @@ -323,13 +323,7 @@ Then generate the Remote Server configuration from the central Centreon server. 3. Missing files in /etc/centreon -Check that **/etc/centreon** includes the following files and that they are not empty: - -* instCentCore.conf -* instCentPlugins.conf -* instCentWeb.conf - -If missing or empty, copy them from the Central Server. +Check that **/etc/centreon/instCentWeb.conf** file is not empty. If missing or empty, copy it from the Central Server. Purge the import tasks table: :: From f9fb92737b1d13802c0e74aaeae9f9b19c94e464 Mon Sep 17 00:00:00 2001 From: Laurent Pinsivy Date: Fri, 29 Nov 2019 16:43:05 +0100 Subject: [PATCH 03/12] enh(doc): remove unsused instCent*.conf files --- doc/fr/faq/remote_server.rst | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/doc/fr/faq/remote_server.rst b/doc/fr/faq/remote_server.rst index 87bd13077ab..4dd34a14412 100644 --- a/doc/fr/faq/remote_server.rst +++ b/doc/fr/faq/remote_server.rst @@ -334,13 +334,7 @@ central. 3. Fichiers manquants dans le répertoire /etc/centreon -Vérifiez que le répertoire **/etc/centreon** contient les fichiers suivants : - -* instCentCore.conf -* instCentPlugins.conf -* instCentWeb.conf - -et que ces fichiers ne sont pas vides, sinon copiez les depuis le serveur Centreon +Vérifiez que le fichier **/etc/centreon/instCentWeb.conf** n'est pas vide, sinon copiez les depuis le serveur Centreon Central. Purgez la table des tâches d'import : :: From 27188d7ea3751a1a4327f07fb660adf551bdfa84 Mon Sep 17 00:00:00 2001 From: Loic Laurent Date: Mon, 2 Dec 2019 10:18:40 +0100 Subject: [PATCH 04/12] enh(core): delete centcore service script --- tmpl/install/debian/centcore.default | 9 -- tmpl/install/debian/centcore.init.d | 105 ---------------- tmpl/install/redhat/centcore.init.d | 141 ---------------------- tmpl/install/redhat/centcore.sysconfig | 2 - tmpl/install/redhat/centcore.systemd | 33 ------ tmpl/install/suse/centcore.init.d | 158 ------------------------- tmpl/install/suse/centcore.sysconfig | 2 - 7 files changed, 450 deletions(-) delete mode 100644 tmpl/install/debian/centcore.default delete mode 100644 tmpl/install/debian/centcore.init.d delete mode 100644 tmpl/install/redhat/centcore.init.d delete mode 100644 tmpl/install/redhat/centcore.sysconfig delete mode 100644 tmpl/install/redhat/centcore.systemd delete mode 100644 tmpl/install/suse/centcore.init.d delete mode 100644 tmpl/install/suse/centcore.sysconfig diff --git a/tmpl/install/debian/centcore.default b/tmpl/install/debian/centcore.default deleted file mode 100644 index d6aa71e94ea..00000000000 --- a/tmpl/install/debian/centcore.default +++ /dev/null @@ -1,9 +0,0 @@ -# Configuration for /etc/init.d/centcore - -# If run centcore at startup default: NO -RUN_AT_STARTUP="NO" - -# Centreon user default: nagios -CENTREON_USER="@CENTREON_USER@" - -OPTIONS="--logfile=@CENTREON_LOG@/centcore.log --severity=error --config=@CENTREON_ETC@/conf.pm" \ No newline at end of file diff --git a/tmpl/install/debian/centcore.init.d b/tmpl/install/debian/centcore.init.d deleted file mode 100644 index 0ad8e902343..00000000000 --- a/tmpl/install/debian/centcore.init.d +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: centcore -# Required-Start: $local_fs $network -# Required-Stop: $local_fs $network -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Should-Start: mysql -# Should-Stop: -# Short-Description: Start daemon centcore at boot -# Description: Enable service provided CentCore : Manage pollers -### END INIT INFO - -PKGNAME=centcore -DESC="Centcore" -DAEMON=@CENTCORE_BINDIR@/centcore -PIDFILE=@CENTREON_RUNDIR@/centcore.pid -FOLDER=/var/run/centreon/ -if [ ! -d "$FOLDER" ]; then # Control will enter here if $DIRECTORY doesn't exist. - mkdir $FOLDER -fi - -if [ ! -x "${DAEMON}" ]; then - echo "The program ${DAEMON} does not exists or is not executable" - exit 3 -fi - -# Include the default user configuration if exists -[ -r /etc/default/${PKGNAME} ] && . /etc/default/${PKGNAME} - -# Load the VERBOSE setting and other rcS variables -[ -f /etc/init/vars.sh ] && . /etc/init/vars.sh - -# Define LSB log_* functions. -# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. -. /lib/lsb/init-functions - -if [ -z "${RUN_AT_STARTUP}" -o "${RUN_AT_STARTUP}" != "YES" ]; then - log_warning_msg "Not starting $PKGNAME, edit /etc/default/$PKGNAME to start it." - exit 0 -fi - -if [ -z "${CENTREON_USER}" ]; then - log_warning_msg "Not starting $PKGNAME, CENTREON_USER not set in /etc/default/$PKGNAME." - exit 0 -fi - -do_start() -{ - start-stop-daemon --start --background --quiet --pidfile ${PIDFILE} --exec ${DAEMON} \ - --chuid ${CENTREON_USER} --user ${CENTREON_USER} --test -- $OPTIONS - [ "$?" = "0" ] || return 1 - start-stop-daemon --start --background --quiet --pidfile ${PIDFILE} --exec ${DAEMON} \ - --make-pidfile --chuid ${CENTREON_USER} --user ${CENTREON_USER} -- $OPTIONS - [ "$?" = "0" ] || return 2 - return 0 -} - -do_stop() -{ - start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --user ${CENTREON_USER} --pidfile ${PIDFILE} - [ "$?" = "2" ] && return 2 - rm -rf ${PIDFILE} - [ "$?" = 0 ] && return 0 || return 1 -} - -case "$1" in - start) - [ "${VERBOSE}" != "no" ] && log_daemon_msg "Starting ${DESC}" "${PKGNAME}" - do_start - case "$?" in - 0|1) [ "${VERBOSE}" != "no" ] && log_end_msg 0 ;; - 2) [ "${VERBOSE}" != "no" ] && log_end_msg 1 ;; - esac - ;; - stop) - [ "${VERBOSE}" != no ] && log_daemon_msg "Stopping ${DESC}" "${PKGNAME}" - do_stop - case "$?" in - 0|1) [ "${VERBOSE}" != no ] && log_end_msg 0 ;; - 2) [ "${VERBOSE}" != no ] && log_end_msg 1 ;; - esac - ;; - status) - status_of_proc ${DAEMON} ${PKGNAME} -p ${PIDFILE} - ;; - restart|force-reload) - [ "${VERBOSE}" != no ] && log_daemon_msg "Restarting ${DESC}" "${PKGNAME}" - do_stop - case "$?" in - 0|1) - do_start - case "$?" in - 0) log_end_msg 0 ;; - 1) log_end_msg 1 ;; - *) log_end_msg 1 ;; - esac - ;; - *) log_end_msg 1 ;; - esac - ;; - *) - echo "Usage: ${SCRIPTNAME} (start|stop|status|restart|force-reload)" >&2 - exit 3 -esac diff --git a/tmpl/install/redhat/centcore.init.d b/tmpl/install/redhat/centcore.init.d deleted file mode 100644 index 4a986287092..00000000000 --- a/tmpl/install/redhat/centcore.init.d +++ /dev/null @@ -1,141 +0,0 @@ -#!/usr/bin/env bash -# -# crond Start/Stop the centcore daemon. -# -# chkconfig: 2345 70 30 -# description: centcore is a Centreon program that manage pollers -# processname: centcore -# config: @CENTREON_ETC@ -# pidfile: ${RunDir}/centcore.pid - -# Source function library. -. /etc/init.d/functions - -binary=@CENTCORE_BINDIR@/centcore -servicename=centcore -user=@CENTREON_USER@ -timeout=60 -start_timeout=5 - -pidfile=@CENTREON_RUNDIR@/centcore.pid - -FOLDER=/var/run/centreon/ -if [ ! -d "$FOLDER" ]; then # Control will enter here if $DIRECTORY doesn't exist. - mkdir $FOLDER -fi - -[ -e /etc/sysconfig/$servicename ] && . /etc/sysconfig/$servicename - -# Check if we can find the binary. -if [ ! -x $binary ]; then - echo -n $"Starting $servicename."; - failure $"Executable file $binary not found. Exiting." - echo - exit 2 -fi - -start() { - echo -n $"Starting $servicename: " - if [ -e "$pidfile" ] && [ -n "$(cat $pidfile)" ] && [ -e "/proc/`cat $pidfile`" ]; then - echo -n $"cannot start $servicename: $servicename is already running."; - failure $"cannot start $servicename: $servicename already running."; - echo - return 1 - fi - if [ ! -e "$pidfile" ] ; then - pid=$(pidofproc $binary) - if [ -n "$pid" ] ; then - echo -n $"cannot start $servicename: $servicename is already running."; - failure $"cannot start $servicename: $servicename already running."; - echo - return 1 - fi - fi - - if [ "$(id -u -n)" = "$user" ] ; then - daemon ''$binary' '$OPTIONS' > /dev/null 2>&1 &' - else - daemon --user $user ''$binary' '$OPTIONS' > /dev/null 2>&1 &' - fi - - i=0 - while : ; do - if [ "$i" -gt $start_timeout ] ; then - failure $"service not launched" - echo - return 1 - fi - pid=$(pidofproc $binary) - if [ -n "$pid" ] ; then - echo $pid > $pidfile - break - fi - sleep 1 - i=$(($i + 1)) - done - success $"service launched" - echo - return 0 -} - -stop() { - echo -n $"Stopping $servicename: " - if [ ! -e "$pidfile" ] || [ -z "$(cat $pidfile)" ] ; then - killproc -d $timeout "$binary" - else - killproc -p "$pidfile" -d $timeout "$binary" - fi - RETVAL=$? - echo - return $RETVAL -} - -rhstatus() { - if [ ! -e "$pidfile" ] || [ -z "$(cat $pidfile)" ] ; then - status "$binary" - else - status -p "$pidfile" "$binary" - fi -} - -restart() { - stop - start -} - -reload() { - echo -n $"Reloading $servicename daemon configuration: " - if [ ! -e "$pidfile" ] || [ -z "$(cat $pidfile)" ] ; then - killproc "$binary" -HUP - else - killproc -p "$pidfile" "$binary" -HUP - fi - RETVAL=$? - echo - return $RETVAL -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - reload) - reload - ;; - status) - rhstatus - ;; - condrestart) - [ -f /var/lock/subsys/centcore ] && restart || : - ;; - *) - echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}" - exit 1 -esac - diff --git a/tmpl/install/redhat/centcore.sysconfig b/tmpl/install/redhat/centcore.sysconfig deleted file mode 100644 index 7d87a49e11d..00000000000 --- a/tmpl/install/redhat/centcore.sysconfig +++ /dev/null @@ -1,2 +0,0 @@ -# centcore command line options -OPTIONS="--logfile=@CENTREON_LOG@/centcore.log --severity=error --config=@CENTREON_ETC@/conf.pm" \ No newline at end of file diff --git a/tmpl/install/redhat/centcore.systemd b/tmpl/install/redhat/centcore.systemd deleted file mode 100644 index 87c9b22d69f..00000000000 --- a/tmpl/install/redhat/centcore.systemd +++ /dev/null @@ -1,33 +0,0 @@ -## -## Copyright 2015,2019 Centreon -## -## Licensed under the Apache License, Version 2.0 (the "License"); -## you may not use this file except in compliance with the License. -## You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## -## For more information : contact@centreon.com -## - -[Unit] -Description=Centreon Core -PartOf=centreon.service -After=centreon.service -ReloadPropagatedFrom=centreon.service - -[Service] -EnvironmentFile=/etc/sysconfig/centcore -ExecStart=@CENTCORE_BINDIR@/centcore $OPTIONS -ExecReload=/bin/kill -HUP $MAINPID -Type=simple -User=centreon - -[Install] -WantedBy=centreon.service diff --git a/tmpl/install/suse/centcore.init.d b/tmpl/install/suse/centcore.init.d deleted file mode 100644 index 326059aeb92..00000000000 --- a/tmpl/install/suse/centcore.init.d +++ /dev/null @@ -1,158 +0,0 @@ -#!/usr/bin/env bash -### BEGIN INIT INFO -# Provides: centcore -# Required-Start: $syslog $remote_fs -# Should-Start: centcore -# Required-Stop: $syslog $remote_fs -# Should-Stop: centcore -# Default-Start: 2 3 5 -# Default-Stop: 0 1 6 -# Description: centcore is a Centreon program that manage pollers -# Short-Description: centcore is a Centreon program that manage pollers -### END INIT INFO - -# Source function library. -. /lib/lsb/init-functions - -binary=@CENTCORE_BINDIR@/centcore -servicename=$(basename "$0") -user=@CENTREON_USER@ -timeout=60 -start_timeout=5 -logfile=@CENTREON_LOG@/centcore.log -config=@CENTREON_ETC@/conf.pm - -FOLDER=/var/run/centreon/ -if [ ! -d "$FOLDER" ]; then # Control will enter here if $DIRECTORY doesn't exist. - mkdir $FOLDER -fi - -# Add optionnal option for centcore daemon -opt_daemon="" -if [ -n "${logfile}" ]; then - opt_daemon=" --logfile=${logfile}" -fi - -if [ -n "${config}" ]; then - opt_daemon="${opt_daemon} --config=${config}" -fi - -pidfile=@CENTREON_RUNDIR@/centcore.pid - -# Check if we can find the binary. -if [ ! -x $binary ]; then - echo -n $"Starting $servicename."; - log_failure_msg $"Executable file $binary not found. Exiting." - echo - exit 2 -fi - -start() { - echo -n $"Starting $servicename: " - if [ -e "$pidfile" ] && [ -n "$(cat $pidfile)" ] && [ -e "/proc/`cat $pidfile`" ]; then - echo -n $"cannot start $servicename: $servicename is already running."; - log_failure_msg $"cannot start $servicename: $servicename already running."; - echo - return 1 - fi - if [ ! -e "$pidfile" ] ; then - pid=$(pidofproc $binary) - if [ -n "$pid" ] ; then - echo -n $"cannot start $servicename: $servicename is already running."; - log_failure_msg $"cannot start $servicename: $servicename already running."; - echo - return 1 - fi - fi - - if [ "$(id -u -n)" = "$user" ] ; then - startproc $binary ${opt_daemon} - else - startproc -u $user $binary ${opt_daemon} - fi - - i=0 - while : ; do - if [ "$i" -gt $start_timeout ] ; then - log_failure_msg $"service not launched" - echo - return 1 - fi - pid=$(pidofproc $binary) - if [ -n "$pid" ] ; then - echo $pid > $pidfile - break - fi - sleep 1 - i=$(($i + 1)) - done - log_success_msg $"service launched" - echo - return 0 -} - -stop() { - echo -n $"Stopping $servicename: " - if [ ! -e "$pidfile" ] || [ -z "$(cat $pidfile)" ] ; then - killproc -t$timeout "$binary" - else - killproc -p "$pidfile" -t$timeout "$binary" - fi - RETVAL=$? - echo - return $RETVAL -} - -rhstatus() { - if [ ! -e "$pidfile" ] || [ -z "$(cat $pidfile)" ] ; then - echo -n "centcore is " - checkproc "$binary" - rc_status -v - else - echo -n "centcore is " - checkproc -p "$pidfile" "$binary" - rc_status -v - fi -} - -restart() { - stop - start -} - -reload() { - echo -n $"Reloading $servicename daemon configuration: " - if [ ! -e "$pidfile" ] || [ -z "$(cat $pidfile)" ] ; then - killproc "$binary" -HUP - else - killproc -p "$pidfile" "$binary" -HUP - fi - RETVAL=$? - echo - return $RETVAL -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - reload) - reload - ;; - status) - rhstatus - ;; - condrestart) - [ -f /var/lock/subsys/centcore ] && restart || : - ;; - *) - echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}" - exit 1 -esac - diff --git a/tmpl/install/suse/centcore.sysconfig b/tmpl/install/suse/centcore.sysconfig deleted file mode 100644 index 7d87a49e11d..00000000000 --- a/tmpl/install/suse/centcore.sysconfig +++ /dev/null @@ -1,2 +0,0 @@ -# centcore command line options -OPTIONS="--logfile=@CENTREON_LOG@/centcore.log --severity=error --config=@CENTREON_ETC@/conf.pm" \ No newline at end of file From 7a5f6ef4f14c4eaff0cbbedfca1b96bdcb2068b7 Mon Sep 17 00:00:00 2001 From: Loic Laurent Date: Mon, 2 Dec 2019 15:53:54 +0100 Subject: [PATCH 05/12] delete centcore --- bin/centcore | 68 ---------------------------------------------------- 1 file changed, 68 deletions(-) delete mode 100644 bin/centcore diff --git a/bin/centcore b/bin/centcore deleted file mode 100644 index 57b211c9480..00000000000 --- a/bin/centcore +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/perl -################################################################################ -# Copyright 2005-2015 Centreon -# Centreon is developped by : Julien Mathis and Romain Le Merlus under -# GPL Licence 2.0. -# -# This program is free software; you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation ; either version 2 of the License. -# -# This program is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, see . -# -# Linking this program statically or dynamically with other modules is making a -# combined work based on this program. Thus, the terms and conditions of the GNU -# General Public License cover the whole combination. -# -# As a special exception, the copyright holders of this program give Centreon -# permission to link this program with independent modules to produce an executable, -# regardless of the license terms of these independent modules, and to copy and -# distribute the resulting executable under terms of Centreon choice, provided that -# Centreon also meet, for each linked independent module, the terms and conditions -# of the license of that module. An independent module is a module which is not -# derived from this program. If you modify this program, you may extend this -# exception to your version of the program, but you are not obliged to do so. If you -# do not wish to do so, delete this exception statement from your version. -# -#################################################################################### - -use warnings; -use centreon::script::centcore; - -centreon::script::centcore->new()->run(); - -__END__ - -=head1 NAME - -centcore - a daemon to manage pollers. - -=head1 SYNOPSIS - -centcore [options] - -=head1 OPTIONS - -=over 8 - -=item B<--config> - -Specify the path to the main configuration file (default: /etc/centreon/conf.pm). - -=item B<--help> - -Print a brief help message and exits. - -=back - -=head1 DESCRIPTION - -B manage pollers: push configurations, send commands, get perfdata/logs (if ndoutils). - -=cut - From 12da47192c41dfb926c0c361db823f382989e954 Mon Sep 17 00:00:00 2001 From: Loic Laurent Date: Tue, 3 Dec 2019 09:55:51 +0100 Subject: [PATCH 06/12] enh(core): remove instCentCore.conf --- doc/en/installation/from_sources.rst | 6 ------ doc/en/upgrade/from_sources.rst | 8 +------- doc/fr/installation/from_sources.rst | 6 ------ doc/fr/upgrade/from_sources.rst | 8 +------- install.sh | 16 ---------------- libinstall/functions | 28 ---------------------------- 6 files changed, 2 insertions(+), 70 deletions(-) diff --git a/doc/en/installation/from_sources.rst b/doc/en/installation/from_sources.rst index 2eaf124013c..99d990bb058 100644 --- a/doc/en/installation/from_sources.rst +++ b/doc/en/installation/from_sources.rst @@ -652,12 +652,6 @@ Poller communication subsystem (Centcore) installation CentCore init script installed OK CentCore default script installed OK - Do you want me to install CentCore run level ? - [y/n], default to [n]: - > y - CentCore Perl lib installed OK - Create /etc/centreon/instCentCore.conf OK - Plugin installation ------------------- diff --git a/doc/en/upgrade/from_sources.rst b/doc/en/upgrade/from_sources.rst index 6b1ec77af1f..de05ca18c21 100644 --- a/doc/en/upgrade/from_sources.rst +++ b/doc/en/upgrade/from_sources.rst @@ -73,8 +73,7 @@ Load the previous installation parameters:: [y/n], default to [y]: > y - Using: /etc/centreon/instCentCore.conf - /etc/centreon/instCentPlugins.conf + Using: /etc/centreon/instCentPlugins.conf /etc/centreon/instCentStorage.conf /etc/centreon/instCentWeb.conf @@ -317,11 +316,6 @@ Fill in the required information. :: CentCore init script installed OK CentCore default script installed OK - Do you want me to install CentCore run level ? - [y/n], default to [n]: - > y - Create /etc/centreon/instCentCore.conf OK - Upgrading Centreon Plugins -------------------------- diff --git a/doc/fr/installation/from_sources.rst b/doc/fr/installation/from_sources.rst index db0a0d0336a..9ececfcee59 100644 --- a/doc/fr/installation/from_sources.rst +++ b/doc/fr/installation/from_sources.rst @@ -658,12 +658,6 @@ Installation du composant Centcore CentCore init script installed OK CentCore default script installed OK - Do you want me to install CentCore run level ? - [y/n], default to [n]: - > y - CentCore Perl lib installed OK - Create /etc/centreon/instCentCore.conf OK - Installation des plugins ------------------------ diff --git a/doc/fr/upgrade/from_sources.rst b/doc/fr/upgrade/from_sources.rst index 01b2a3d36b9..b588f72c659 100644 --- a/doc/fr/upgrade/from_sources.rst +++ b/doc/fr/upgrade/from_sources.rst @@ -73,8 +73,7 @@ Chargement des paramètres d'installation précédents : :: [y/n], default to [y]: > y - Using: /etc/centreon/instCentCore.conf - /etc/centreon/instCentPlugins.conf + Using: /etc/centreon/instCentPlugins.conf /etc/centreon/instCentStorage.conf /etc/centreon/instCentWeb.conf @@ -340,11 +339,6 @@ De nouvelle informations sont nécessaires : :: CentCore init script installed OK CentCore default script installed OK - Do you want me to install CentCore run level ? - [y/n], default to [n]: - > y - Create /etc/centreon/instCentCore.conf OK - Mise à jour des sondes Centreon ------------------------------- diff --git a/install.sh b/install.sh index b0fbc3a0bc9..3141c51db17 100755 --- a/install.sh +++ b/install.sh @@ -372,22 +372,6 @@ if [ "$PROCESS_CENTSTORAGE" -eq 1 ] ; then . $INSTALL_DIR/CentStorage.sh fi -## Start CentCore install -if [ "$PROCESS_CENTCORE" -eq 1 ] ; then - if [ "$use_upgrade_files" -eq 1 -a -e "$inst_upgrade_dir/instCentCore.conf" ] ; then - log "INFO" "$(gettext "Load variables:") $inst_upgrade_dir/instCentCore.conf" - - . $inst_upgrade_dir/instCentCore.conf - if [ -n "$NAGIOS_USER" ]; then - echo_info "$(gettext "Convert variables for upgrade:")" - MONITORINGENGINE_USER=$NAGIOS_USER - [ -n "$NAGIOS_GROUP" ] && MONITORINGENGINE_GROUP=$NAGIOS_GROUP - [ -n "$NAGIOS_ETC" ] && MONITORINGENGINE_ETC=$NAGIOS_ETC - fi - fi - . $INSTALL_DIR/CentCore.sh -fi - ## Start CentPlugins install if [ "$PROCESS_CENTREON_PLUGINS" -eq 1 ] ; then if [ "$use_upgrade_files" -eq 1 -a -e "$inst_upgrade_dir/instCentPlugins.conf" ] ; then diff --git a/libinstall/functions b/libinstall/functions index c1ec4d8ca75..1b0766c9bfb 100755 --- a/libinstall/functions +++ b/libinstall/functions @@ -1727,34 +1727,6 @@ createCentStorageInstallConf() { return 0 } -#--- -## Create a config file for CentCore -## This file will use for upgrade process -## @Globals CENTREON_ETC, INSTALL_DIR_CENTREON, CENTREON_LOG, CENTREON_ETC -## @Globals CENTREON_RUNDIR, CENTSTORAGE_RRD, CENTSTORAGE_BINDIR -## @Globals NAGIOS_USER, NAGIOS_GROUP, RRD_PERL, CRON_D, INIT_D -#---- -createCentCoreInstallConf() { - ${CAT} <<- __EOT__ > $CENTREON_ETC/instCentCore.conf - INSTALL_DIR_CENTREON=$INSTALL_DIR_CENTREON - CENTREON_ETC=$CENTREON_ETC - CENTREON_RUNDIR=$CENTREON_RUNDIR - CENTREON_LOG=$CENTREON_LOG - CENTREON_VARLIB=$CENTREON_VARLIB - CENTREON_CACHEDIR=$CENTREON_CACHEDIR - CENTCORE_BINDIR=$CENTCORE_BINDIR - BIN_SSH=$BIN_SSH - BIN_SCP=$BIN_SCP - CENTREON_GROUP=$CENTREON_GROUP - CENTREON_USER=$CENTREON_USER - RRD_PERL=$RRD_PERL - INIT_D=$INIT_D - __EOT__ - - echo_success "Create $CENTREON_ETC/instCentCore.conf " "OK" - return 0 -} - #--- ## Create a config file for CentPlugins ## This file will use for upgrade process From d4278886b95fa8a53be9a46de63a1828c6f9d7ad Mon Sep 17 00:00:00 2001 From: Loic Laurent Date: Tue, 3 Dec 2019 16:38:41 +0100 Subject: [PATCH 07/12] delete libinstall centcore script --- libinstall/CentCore.sh | 202 ----------------------------------------- libinstall/functions | 17 ---- 2 files changed, 219 deletions(-) delete mode 100755 libinstall/CentCore.sh diff --git a/libinstall/CentCore.sh b/libinstall/CentCore.sh deleted file mode 100755 index 6a9ffe071a5..00000000000 --- a/libinstall/CentCore.sh +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env bash -#---- -## @Synopsis Install script for CentCore -## @Copyright Copyright 2008, Guillaume Watteeux -## @license GPL : http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt -## Install script for CentCore -#---- -# install script for centcore -################################# -# SVN: $Id$ - -echo -e "\n$line" -echo -e "\t$(gettext "Starting CentCore Installation")" -echo -e "$line" - -###### Check disk space -check_tmp_disk_space -if [ "$?" -eq 1 ] ; then - if [ "$silent_install" -eq 1 ] ; then - purge_centreon_tmp_dir "silent" - else - purge_centreon_tmp_dir - fi -fi - -###### Require -################################# -## Where is install_dir_centreon ? -locate_centreon_installdir -locate_centreon_etcdir -locate_centreon_rundir -locate_centreon_logdir -locate_centreon_varlib -locate_centreon_generationdir -locate_centcore_bindir -locate_init_d - -## Config Nagios -check_centreon_group -check_centreon_user - -## Populate temporaty source directory -copyInTempFile 2>>$LOG_FILE - -## Create temporary folder -log "INFO" "$(gettext "Create working directory")" -mkdir -p $TMP_DIR/{work,final}/bin -[ ! -d $INSTALL_DIR_CENTREON/examples ] && mkdir -p $INSTALL_DIR_CENTREON/examples -# Copy init.d template in src -DISTRIB="" -find_OS "DISTRIB" -if [ "$DISTRIB" = "DEBIAN" ]; then - cp -f $BASE_DIR/tmpl/install/debian/centcore.init.d $TMP_DIR/src - cp -f $BASE_DIR/tmpl/install/debian/centcore.default $TMP_DIR/src -elif [ "$DISTRIB" = "SUSE" ]; then - cp -f $BASE_DIR/tmpl/install/suse/centcore.init.d $TMP_DIR/src - cp -f $BASE_DIR/tmpl/install/suse/centcore.sysconfig $TMP_DIR/src -else - cp -f $BASE_DIR/tmpl/install/redhat/centcore.init.d $TMP_DIR/src - cp -f $BASE_DIR/tmpl/install/redhat/centcore.sysconfig $TMP_DIR/src -fi - -###### CentCore binary -################################# -## Change macros for CentCore binary - -log "INFO" "$(gettext "Copying CentCore in binary directory")" -$INSTALL_DIR/cinstall $cinstall_opts \ - -u "$CENTREON_USER" -g "$CENTREON_GROUP" -m 755 \ - $TMP_DIR/src/bin/centcore $CENTCORE_BINDIR/centcore >> $LOG_FILE 2>&1 -check_result $? "$(gettext "Copy CentCore in binary directory")" - -## Change right on CENTREON_RUNDIR -log "INFO" "$(gettext "Change right") : $CENTREON_RUNDIR" -$INSTALL_DIR/cinstall $cinstall_opts -u "$CENTREON_USER" -d 750 \ - $CENTREON_RUNDIR >> $LOG_FILE 2>&1 -check_result $? "$(gettext "Change right") : $CENTREON_RUNDIR" - -## Change tight on CENTREON_VARLIB -log "INFO" "$(gettext "Change right") : $CENTREON_VARLIB" -$INSTALL_DIR/cinstall $cinstall_opts -g "$CENTREON_USER" -d 775 \ - $CENTREON_VARLIB >> $LOG_FILE 2>&1 -check_result $? "$(gettext "Change right") : $CENTREON_VARLIB" - -## Add logrotate -log "INFO" "$(gettext "Change macros for centcore.logrotate")" -${SED} -e 's|@CENTREON_LOG@|'"$CENTREON_LOG"'|g' \ - $TMP_DIR/src/logrotate/centcore > $TMP_DIR/work/centcore.logrotate -check_result $? "$(gettext "Change macros for centcore.logrotate")" -cp $TMP_DIR/work/centcore.logrotate $TMP_DIR/final/centcore.logrotate >> "$LOG_FILE" 2>&1 - -log "INFO" "$(gettext "Install centcore.logrotate")" -$INSTALL_DIR/cinstall $cinstall_opts \ - -m 644 \ - $TMP_DIR/final/centcore.logrotate $LOGROTATE_D/centcore >> "$LOG_FILE" 2>&1 -check_result $? "$(gettext "Install Centreon Core logrotate.d file")" - -###### CentCore init -################################# -## Change macros in CentCore init script -${SED} -e 's|@CENTREON_DIR@|'"$INSTALL_DIR_CENTREON"'|g' \ - -e 's|@CENTREON_LOG@|'"$CENTREON_LOG"'|g' \ - -e 's|@CENTREON_ETC@|'"$CENTREON_ETC"'|g' \ - -e 's|@CENTREON_RUNDIR@|'"$CENTREON_RUNDIR"'|g' \ - -e 's|@CENTCORE_BINDIR@|'"$CENTCORE_BINDIR"'|g' \ - -e 's|@CENTREON_USER@|'"$CENTREON_USER"'|g' \ - $TMP_DIR/src/centcore.init.d > $TMP_DIR/work/centcore.init.d -check_result $? "$(gettext "Replace CentCore init script Macro")" - -if [ "$DISTRIB" = "DEBIAN" ]; then - ${SED} -e 's|"NO"|"YES"|g' -e "s|@CENTREON_LOG@|$CENTREON_LOG|g" -e "s|@CENTREON_ETC@|$CENTREON_ETC|g" -e "s|@CENTREON_USER@|$CENTREON_USER|g" $TMP_DIR/src/centcore.default > $TMP_DIR/work/centcore.default - check_result $? "$(gettext "Replace CentCore default script Macro")" - cp $TMP_DIR/work/centcore.default $TMP_DIR/final/centcore.default - cp $TMP_DIR/final/centcore.default $INSTALL_DIR_CENTREON/examples/centcore.default -elif [ "$DISTRIB" = "REDHAT" -o "$DISTRIB" = "SUSE" ]; then - ${SED} -e "s|@CENTREON_USER@|$CENTREON_USER|g" \ - -e 's|@CENTREON_ETC@|'"$CENTREON_ETC"'|g' \ - -e 's|@CENTREON_LOG@|'"$CENTREON_LOG"'|g' \ - $TMP_DIR/src/centcore.sysconfig > $TMP_DIR/work/centcore.sysconfig - check_result $? "$(gettext "Replace CentCore sysconfig script Macro")" - cp $TMP_DIR/work/centcore.sysconfig $TMP_DIR/final/centcore.sysconfig - cp $TMP_DIR/final/centcore.sysconfig $INSTALL_DIR_CENTREON/examples/centcore.sysconfig -fi - -cp $TMP_DIR/work/centcore.init.d $TMP_DIR/final/centcore.init.d -cp $TMP_DIR/final/centcore.init.d $INSTALL_DIR_CENTREON/examples/centcore.init.d - -RC="1" -if [ ! "${CENTCORE_INSTALL_INIT}" ] ; then - yes_no_default "$(gettext "Do you want me to install CentCore init script ?")" - RC="$?" -elif [ "${CENTCORE_INSTALL_INIT}" -eq 1 ] ; then - RC="0" -fi -if [ "$RC" -eq "0" ] ; then - log "INFO" "$(gettext "CentCore init script installed")" - $INSTALL_DIR/cinstall $cinstall_opts -m 755 \ - $TMP_DIR/final/centcore.init.d \ - $INIT_D/centcore >> $LOG_FILE 2>&1 - check_result $? "$(gettext "CentCore init script installed")" - log "INFO" "$(gettext "CentCore init script installed")" - RC="1" - if [ "$DISTRIB" = "DEBIAN" ]; then - log "INFO" "$(gettext "CentCore default script installed")" - $INSTALL_DIR/cinstall $cinstall_opts -m 644 \ - $TMP_DIR/final/centcore.default \ - /etc/default/centcore >> $LOG_FILE 2>&1 - check_result $? "$(gettext "CentCore default script installed")" - log "INFO" "$(gettext "CentCore default script installed")" - elif [ "$DISTRIB" = "REDHAT" -o "$DISTRIB" = "SUSE" ]; then - log "INFO" "$(gettext "CentCore sysconfig script installed")" - $INSTALL_DIR/cinstall $cinstall_opts -m 644 \ - $TMP_DIR/final/centcore.sysconfig \ - /etc/sysconfig/centcore >> $LOG_FILE 2>&1 - check_result $? "$(gettext "CentCore sysconfig script installed")" - log "INFO" "$(gettext "CentCore sysconfig script installed")" - fi - if [ ! "${CENTCORE_INSTALL_RUNLVL}" ] ; then - yes_no_default "$(gettext "Do you want me to install CentCore run level ?")" - RC="$?" - elif [ "${CENTCORE_INSTALL_RUNLVL}" -eq 1 ] ; then - RC="0" - fi - if [ "$RC" -eq "0" ] ; then - install_init_service "centcore" | tee -a $LOG_FILE - #check_result $? "$(gettext "CentCore run level installed")" - log "INFO" "$(gettext "CentCore run level installed")" - else - echo_passed "$(gettext "CentCore run level not installed")" "$passed" - log "INFO" "$(gettext "CentCore run level not installed")" - fi - - # Install centcore perl lib - $INSTALL_DIR/cinstall $cinstall_opts -m 755 \ - $TMP_DIR/src/lib/perl/centreon/common/ \ - $PERL_LIB_DIR/centreon/common/ >> $LOG_FILE 2>&1 - $INSTALL_DIR/cinstall $cinstall_opts -m 755 \ - $TMP_DIR/src/lib/perl/centreon/script.pm \ - $PERL_LIB_DIR/centreon/script.pm >> $LOG_FILE 2>&1 - $INSTALL_DIR/cinstall $cinstall_opts -m 755 \ - $TMP_DIR/src/lib/perl/centreon/script/centcore.pm \ - $PERL_LIB_DIR/centreon/script/centcore.pm >> $LOG_FILE 2>&1 - $INSTALL_DIR/cinstall $cinstall_opts -m 755 \ - $TMP_DIR/src/lib/perl/centreon/script/centreonSyncArchives.pm \ - $PERL_LIB_DIR/centreon/script/centreonSyncArchives.pm >> $LOG_FILE 2>&1 - $INSTALL_DIR/cinstall $cinstall_opts -m 755 \ - $TMP_DIR/src/lib/perl/centreon/script/centreonSyncPlugins.pm \ - $PERL_LIB_DIR/centreon/script/centreonSyncPlugins.pm >> $LOG_FILE 2>&1 - echo_success "$(gettext "CentCore Perl lib installed")" "$ok" - log "INFO" "$(gettext "CentCore Perl lib installed")" -else - echo_passed "$(gettext "CentCore init script not installed, please use "):\n $INSTALL_DIR_CENTREON/examples/centcore.init.d" "$passed" - log "INFO" "$(gettext "CentCore init script not installed, please use "): $INSTALL_DIR_CENTREON/examples/centcore.init.d" -fi - -###### Post Install -################################# -createCentCoreInstallConf - -## wait and see... -## sql console inject ? - diff --git a/libinstall/functions b/libinstall/functions index 1b0766c9bfb..2e44983a8be 100755 --- a/libinstall/functions +++ b/libinstall/functions @@ -881,23 +881,6 @@ locate_centstorage_libdir() { log "INFO" "CENTSTORAGE_LIBDIR: $CENTSTORAGE_LIBDIR" } -#---- -## Define where is centCore binary directory -## @Globals CENTCORE_BINDIR, INSTALL_DIR_CENTREON, DEFAULT_CENTCORE_BINDIR -#---- -locate_centcore_bindir() { - if [ -z "$CENTCORE_BINDIR" ] ; then - answer_with_createdir "$(gettext "Where is your CentCore binary directory")" "$INSTALL_DIR_CENTREON/$DEFAULT_CENTCORE_BINDIR" "CENTCORE_BINDIR" - echo_success "$(gettext "Path" ) $CENTCORE_BINDIR" "$ok" - elif [ ! -d "$CENTCORE_BINDIR" -a "$silent_install" -eq 1 ] ; then - mkdir -p $CENTCORE_BINDIR - log "INFO" "$(gettext "Create") $CENTCORE_BINDIR" - fi - CENTCORE_BINDIR=`trim ${CENTCORE_BINDIR%/}` - export CENTCORE_BINDIR - log "INFO" "CENTCORE_BINDIR: $CENTCORE_BINDIR" -} - #---- ## Define where is centPlugins temporary directory ## @Globals CENTPLUGINS_TMP, DEFAULT_CENTPLUGINS_TMP From ca3e1e6d3408d570066e5defb8463a360ead5651 Mon Sep 17 00:00:00 2001 From: Loic Laurent Date: Wed, 4 Dec 2019 14:33:51 +0100 Subject: [PATCH 08/12] delete centcore logrotate --- logrotate/centcore | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 logrotate/centcore diff --git a/logrotate/centcore b/logrotate/centcore deleted file mode 100644 index 1af33cd7ddc..00000000000 --- a/logrotate/centcore +++ /dev/null @@ -1,10 +0,0 @@ -@CENTREON_LOG@/centcore.log { - copytruncate - weekly - rotate 52 - compress - delaycompress - notifempty - missingok - su root root -} From 783679528500d87cc31472630e6f1d1555fbf563 Mon Sep 17 00:00:00 2001 From: Kevin Duret Date: Mon, 9 Dec 2019 09:55:50 +0100 Subject: [PATCH 09/12] Update doc/fr/faq/remote_server.rst --- doc/fr/faq/remote_server.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/fr/faq/remote_server.rst b/doc/fr/faq/remote_server.rst index 4dd34a14412..bee540ae971 100644 --- a/doc/fr/faq/remote_server.rst +++ b/doc/fr/faq/remote_server.rst @@ -334,7 +334,7 @@ central. 3. Fichiers manquants dans le répertoire /etc/centreon -Vérifiez que le fichier **/etc/centreon/instCentWeb.conf** n'est pas vide, sinon copiez les depuis le serveur Centreon +Vérifiez que le fichier **/etc/centreon/instCentWeb.conf** n'est pas vide, sinon copiez le depuis le serveur Centreon Central. Purgez la table des tâches d'import : :: From 6c5ea2e5a9610cf171102334ff8fbc2eef69cbfc Mon Sep 17 00:00:00 2001 From: Loic Laurent Date: Wed, 18 Dec 2019 09:49:39 +0100 Subject: [PATCH 10/12] clean unused option enable_perfdata_sync --- www/class/centreon-clapi/centreonSettings.class.php | 1 - www/include/Administration/parameters/DB-Func.php | 5 ----- www/include/Administration/parameters/api/help.php | 4 ---- www/include/Administration/parameters/centcore/help.php | 4 ---- 4 files changed, 14 deletions(-) diff --git a/www/class/centreon-clapi/centreonSettings.class.php b/www/class/centreon-clapi/centreonSettings.class.php index 52eb9495c7f..21d672e1323 100644 --- a/www/class/centreon-clapi/centreonSettings.class.php +++ b/www/class/centreon-clapi/centreonSettings.class.php @@ -64,7 +64,6 @@ public function __construct(\Pimple\Container $dependencyInjector) $this->authorizedOptions = array( 'broker' => array('values' => array('ndo', 'broker')), 'centstorage' => array('values' => array('0', '1')), - 'enable_perfdata_sync' => array('values' => array('0', '1')), 'enable_logs_sync' => array('values' => array('0', '1')), 'gmt' => array( 'format' => self::ISSTRING, diff --git a/www/include/Administration/parameters/DB-Func.php b/www/include/Administration/parameters/DB-Func.php index f5eebaaaa3f..235651261df 100644 --- a/www/include/Administration/parameters/DB-Func.php +++ b/www/include/Administration/parameters/DB-Func.php @@ -284,11 +284,6 @@ function updateNagiosConfigData($gopt_id = null) function updateCentcoreConfigData($db, $form, $centreon) { $ret = $form->getSubmitValues(); - updateOption( - $db, - "enable_perfdata_sync", - isset($ret["enable_perfdata_sync"]) && $ret['enable_perfdata_sync'] ? 1 : 0 - ); updateOption($db, "enable_logs_sync", isset($ret["enable_logs_sync"]) && $ret['enable_logs_sync'] ? 1 : 0); updateOption($db, "enable_broker_stats", isset($ret["enable_broker_stats"]) && $ret['enable_broker_stats'] ? 1 : 0); updateOption( diff --git a/www/include/Administration/parameters/api/help.php b/www/include/Administration/parameters/api/help.php index 0a495ad5fea..1d5ef8354d5 100644 --- a/www/include/Administration/parameters/api/help.php +++ b/www/include/Administration/parameters/api/help.php @@ -4,10 +4,6 @@ /** * Centcore Settings */ -$help['tip_enable_perfdata_sync'] = dgettext( - 'help', - 'Enable Perfdata synchronisation between poller and Central Server operated by Centcore' -); $help['tip_enable_logs_sync'] = dgettext( 'help', 'Enable Monitoring Engine Logs synchronisation between poller and Central Server operated by Centcore' diff --git a/www/include/Administration/parameters/centcore/help.php b/www/include/Administration/parameters/centcore/help.php index 19e0b985b4a..2901b7f1005 100644 --- a/www/include/Administration/parameters/centcore/help.php +++ b/www/include/Administration/parameters/centcore/help.php @@ -4,10 +4,6 @@ /** * Centcore Settings */ -$help['tip_enable_perfdata_sync'] = dgettext( - 'help', - 'Enable Perfdata synchronisation between poller and Central Server operated by Centcore' -); $help['tip_enable_logs_sync'] = dgettext( 'help', 'Enable Monitoring Engine Logs synchronisation between poller and Central Server operated by Centcore' From 7abaafd051be81cd45aa6126c38443dc17c0d62c Mon Sep 17 00:00:00 2001 From: Loic Laurent Date: Wed, 18 Dec 2019 10:07:00 +0100 Subject: [PATCH 11/12] clean unused option enable_logs_sync --- www/class/centreon-clapi/centreonSettings.class.php | 1 - www/include/Administration/parameters/DB-Func.php | 1 - www/include/Administration/parameters/api/help.php | 4 ---- www/include/Administration/parameters/centcore/help.php | 4 ---- www/install/sql/centreon/Update-DB-20.04.0-beta.1.sql | 3 +++ 5 files changed, 3 insertions(+), 10 deletions(-) diff --git a/www/class/centreon-clapi/centreonSettings.class.php b/www/class/centreon-clapi/centreonSettings.class.php index 21d672e1323..db6b0c1f898 100644 --- a/www/class/centreon-clapi/centreonSettings.class.php +++ b/www/class/centreon-clapi/centreonSettings.class.php @@ -64,7 +64,6 @@ public function __construct(\Pimple\Container $dependencyInjector) $this->authorizedOptions = array( 'broker' => array('values' => array('ndo', 'broker')), 'centstorage' => array('values' => array('0', '1')), - 'enable_logs_sync' => array('values' => array('0', '1')), 'gmt' => array( 'format' => self::ISSTRING, 'getterFormatMethod' => 'getTimezonenameFromId', diff --git a/www/include/Administration/parameters/DB-Func.php b/www/include/Administration/parameters/DB-Func.php index 235651261df..4d354e4a6b1 100644 --- a/www/include/Administration/parameters/DB-Func.php +++ b/www/include/Administration/parameters/DB-Func.php @@ -284,7 +284,6 @@ function updateNagiosConfigData($gopt_id = null) function updateCentcoreConfigData($db, $form, $centreon) { $ret = $form->getSubmitValues(); - updateOption($db, "enable_logs_sync", isset($ret["enable_logs_sync"]) && $ret['enable_logs_sync'] ? 1 : 0); updateOption($db, "enable_broker_stats", isset($ret["enable_broker_stats"]) && $ret['enable_broker_stats'] ? 1 : 0); updateOption( $db, diff --git a/www/include/Administration/parameters/api/help.php b/www/include/Administration/parameters/api/help.php index 1d5ef8354d5..a40a087450a 100644 --- a/www/include/Administration/parameters/api/help.php +++ b/www/include/Administration/parameters/api/help.php @@ -4,10 +4,6 @@ /** * Centcore Settings */ -$help['tip_enable_logs_sync'] = dgettext( - 'help', - 'Enable Monitoring Engine Logs synchronisation between poller and Central Server operated by Centcore' -); $help['tip_centcore_cmd_timeout'] = dgettext( 'help', "Timeout value in seconds. Used for freeing Centcore when it's stuck because" diff --git a/www/include/Administration/parameters/centcore/help.php b/www/include/Administration/parameters/centcore/help.php index 2901b7f1005..0c9f08ab50b 100644 --- a/www/include/Administration/parameters/centcore/help.php +++ b/www/include/Administration/parameters/centcore/help.php @@ -4,10 +4,6 @@ /** * Centcore Settings */ -$help['tip_enable_logs_sync'] = dgettext( - 'help', - 'Enable Monitoring Engine Logs synchronisation between poller and Central Server operated by Centcore' -); $help['tip_centcore_cmd_timeout'] = dgettext( 'help', "Timeout value in seconds. Used for freeing Centcore when it's stuck" diff --git a/www/install/sql/centreon/Update-DB-20.04.0-beta.1.sql b/www/install/sql/centreon/Update-DB-20.04.0-beta.1.sql index 8bda310ea49..5ca702b90b2 100644 --- a/www/install/sql/centreon/Update-DB-20.04.0-beta.1.sql +++ b/www/install/sql/centreon/Update-DB-20.04.0-beta.1.sql @@ -10,3 +10,6 @@ DELETE FROM `cb_type` WHERE `type_shortname` = 'correlation'; UPDATE topology SET topology_url_opt = '&o=svcOV_pb' WHERE topology_page = 20204; UPDATE topology SET topology_url_opt = '&o=svcOVHG_pb' WHERE topology_page = 20209; UPDATE topology SET topology_url_opt = '&o=svcOVSG_pb' WHERE topology_page = 20212; + +DELETE FROM `options` WHERE `key` = 'enable_perfdata_sync'; +DELETE FROM `options` WHERE `key` = 'enable_logs_sync'; \ No newline at end of file From 0b5e38f004ed58ad18b46d3388f043629f5a9a5d Mon Sep 17 00:00:00 2001 From: Loic Laurent Date: Wed, 18 Dec 2019 10:59:53 +0100 Subject: [PATCH 12/12] clean unused option for fresh install --- www/install/var/baseconf/centreon-broker.sql | 3 --- 1 file changed, 3 deletions(-) diff --git a/www/install/var/baseconf/centreon-broker.sql b/www/install/var/baseconf/centreon-broker.sql index 81e1fceaf63..c4beeb75279 100644 --- a/www/install/var/baseconf/centreon-broker.sql +++ b/www/install/var/baseconf/centreon-broker.sql @@ -153,9 +153,6 @@ INSERT INTO `cfg_centreonbroker_info` (`config_id`, `config_key`, `config_value` INSERT INTO `cfg_centreonbroker_info` (`config_id`, `config_key`, `config_value`, `config_group`, `config_group_id`) VALUES (3,'type','ipv4','output',1); INSERT INTO `cfg_centreonbroker_info` (`config_id`, `config_key`, `config_value`, `config_group`, `config_group_id`) VALUES (3,'blockId','1_3','output',1); -INSERT INTO `options` (`key`, `value`) VALUES ('enable_perfdata_sync', '0'); -INSERT INTO `options` (`key`, `value`) VALUES ('enable_logs_sync', '0'); - UPDATE `nagios_server` SET `centreonbroker_cfg_path` = '@broker_etc@' WHERE `id` = 1; UPDATE `nagios_server` SET `centreonbroker_module_path` = '@centreonbroker_lib@' WHERE `id` = 1;