diff --git a/bin/centreon b/bin/centreon index 5468002a78c93e067ef019c88dade69efb2fcaaa..2a63071382abc5aea8cd1091e2cc4d3e02173da7 100755 --- a/bin/centreon +++ b/bin/centreon @@ -86,8 +86,6 @@ if ($debug) { } } - - require_once _CENTREON_ETC_."/centreon.conf.php"; require_once _CLAPI_CLASS_."/centreonAPI.class.php"; require_once _CLAPI_LIB_."/Centreon/Db/Manager/Manager.php"; @@ -108,8 +106,8 @@ $db = Centreon_Db_Manager::factory('centreon', 'pdo_mysql', $dbConfig); $dbConfig['dbname'] = $conf_centreon['dbcstg']; $db_storage = Centreon_Db_Manager::factory('storage', 'pdo_mysql', $dbConfig); try { - $db->getConnection(); - $db_storage->getConnection(); + $db->getConnection(); + $db_storage->getConnection(); } catch (Exception $e) { echo sprintf("Could not connect to database. Check your configuration file %s\n", _CENTREON_ETC_.'/centreon.conf.php'); if (isset($options['h'])) { @@ -192,5 +190,5 @@ if ($api->login == "" || $api->password == "") { $api->setReturnCode(1); } } - $api->close(); -?> + +$api->close(); diff --git a/doc/en/api/clapi/engine_management.rst b/doc/en/api/clapi/engine_management.rst index 8f98840a1561b71c94bb9555a587180347855add..464206be4b627f879a4e66d83053edabce28eadc 100644 --- a/doc/en/api/clapi/engine_management.rst +++ b/doc/en/api/clapi/engine_management.rst @@ -2,6 +2,10 @@ Poller management ================= +.. note:: + + All actions have to be perform in user root + List available pollers ---------------------- diff --git a/doc/en/exploitation_guide/Real_time_action.rst b/doc/en/exploitation_guide/Real_time_action.rst index d3b52ec99fbcc468aa6db2f8a9aae6389ac7f7c2..60401284611e25784b6975cb168d410a74ababd6 100644 --- a/doc/en/exploitation_guide/Real_time_action.rst +++ b/doc/en/exploitation_guide/Real_time_action.rst @@ -129,6 +129,10 @@ There are two types of downtime: * The **fixed** downtime: it starts and stops at the preview time. * The **flexible** downime: it starts during the preview time window as soon as an incident is detected and finishes when preview time in seconds expires. +.. note:: + + Start and stop of the downtimes are based on the user timezone or if not set on the server timezone. + Practice ======== diff --git a/doc/en/release_notes/centreon-2.7/centreon-2.7.5.rst b/doc/en/release_notes/centreon-2.7/centreon-2.7.5.rst index dad018f5f7b4377916109b61222ede19022678fb..60553d87d2bf0a004ab41655e412014699df4cf3 100644 --- a/doc/en/release_notes/centreon-2.7/centreon-2.7.5.rst +++ b/doc/en/release_notes/centreon-2.7/centreon-2.7.5.rst @@ -26,6 +26,6 @@ Features and Bug Fixes - Fix: Non admin users could not seen services in Reporting page - Fix: Number of hosts in Hostgroups was not good for non admin users - Fix: Max and Min was not correct for inverted curves -- Enh: Add an error message when no pollers are selected in configuration genration page - Fix: It was impossible to create Virtual metrics with web UI in french language - Fix: Exclude Desactivate poller in configuration generation page filter +- Enh: Add an error message when no pollers are selected in configuration genration page diff --git a/doc/fr/api/clapi/engine_management.rst b/doc/fr/api/clapi/engine_management.rst index 8f98840a1561b71c94bb9555a587180347855add..464206be4b627f879a4e66d83053edabce28eadc 100644 --- a/doc/fr/api/clapi/engine_management.rst +++ b/doc/fr/api/clapi/engine_management.rst @@ -2,6 +2,10 @@ Poller management ================= +.. note:: + + All actions have to be perform in user root + List available pollers ---------------------- diff --git a/doc/fr/exploitation_guide/Real_time_action.rst b/doc/fr/exploitation_guide/Real_time_action.rst index 0c1ac4d0f54b37ac36801afffe810d55ef0a3e9c..3179d42839752b9d07e0ad0ea9095edf1c4b5052 100644 --- a/doc/fr/exploitation_guide/Real_time_action.rst +++ b/doc/fr/exploitation_guide/Real_time_action.rst @@ -129,6 +129,10 @@ Il existe deux types de temps d'arrêts : * Le temps d'arrêt **fixe** : il démarre et s'arrête à l'heure prévue. * Le temps d'arrêt **flexible** : il démarrera pendant la fenêtre de temps prévue dès la détection d'un incident et prendra fin lorsque la durée prévue en secondes sera écoulée. +.. note:: + + L'heure de début et de fin du temps d'arrêt est basé sur le fuseau horraire de l'utilisateur ou alors par défaut sur le fuseau horraire du serveur. + Pratique ======== diff --git a/doc/fr/release_notes/centreon-2.7/centreon-2.7.5.rst b/doc/fr/release_notes/centreon-2.7/centreon-2.7.5.rst index dad018f5f7b4377916109b61222ede19022678fb..60553d87d2bf0a004ab41655e412014699df4cf3 100644 --- a/doc/fr/release_notes/centreon-2.7/centreon-2.7.5.rst +++ b/doc/fr/release_notes/centreon-2.7/centreon-2.7.5.rst @@ -26,6 +26,6 @@ Features and Bug Fixes - Fix: Non admin users could not seen services in Reporting page - Fix: Number of hosts in Hostgroups was not good for non admin users - Fix: Max and Min was not correct for inverted curves -- Enh: Add an error message when no pollers are selected in configuration genration page - Fix: It was impossible to create Virtual metrics with web UI in french language - Fix: Exclude Desactivate poller in configuration generation page filter +- Enh: Add an error message when no pollers are selected in configuration genration page diff --git a/www/class/centreon-clapi/centreon.Config.Poller.class.php b/www/class/centreon-clapi/centreon.Config.Poller.class.php index a42eef8515d0b4e659a540ac7ba5f95d53c8e434..0455d40290bd0d5e824c1d84548f18f7e040d380 100644 --- a/www/class/centreon-clapi/centreon.Config.Poller.class.php +++ b/www/class/centreon-clapi/centreon.Config.Poller.class.php @@ -411,8 +411,6 @@ class CentreonConfigPoller { $apacheUser = $this->getApacheUser(); $centreonGroup = $this->getCentreonGroup(); - $oldMask = umask(0113); - $setFilesOwner = 1; if ($apacheUser != "" && $centreonGroup != "") { @@ -448,8 +446,6 @@ class CentreonConfigPoller { print "Please check that files in the followings directory are writable by apache user : ".$this->centreon_path."/filesGeneration/broker/$poller_id/\n"; } - umask($oldMask); - print "Configuration files generated for poller '".$variables."'\n"; return 0; } diff --git a/www/class/config-generate/abstract/host.class.php b/www/class/config-generate/abstract/host.class.php index 57391a733d8a541672756feddc66e62e9ac6636c..b25d3672a3e42a38f5265dceae6e8bfb1e43c36a 100644 --- a/www/class/config-generate/abstract/host.class.php +++ b/www/class/config-generate/abstract/host.class.php @@ -1,4 +1,37 @@ <?php +/** + * 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 <http://www.gnu.org/licenses>. + * + * 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. + * + * For more information : contact@centreon.com + * + */ require_once dirname(__FILE__) . '/object.class.php'; @@ -324,5 +357,3 @@ abstract class AbstractHost extends AbstractObject { return null; } } - -?> diff --git a/www/class/config-generate/abstract/object.class.php b/www/class/config-generate/abstract/object.class.php index 7a82527410fe966cbd89d0ddf08395376d00899b..578dffcb23cf1f3ae94ac408f1cfce6f163c0717 100644 --- a/www/class/config-generate/abstract/object.class.php +++ b/www/class/config-generate/abstract/object.class.php @@ -1,4 +1,37 @@ <?php +/** + * 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 <http://www.gnu.org/licenses>. + * + * 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. + * + * For more information : contact@centreon.com + * + */ abstract class AbstractObject { protected $backend_instance = null; @@ -185,5 +218,3 @@ abstract class AbstractObject { return array(); } } - -?> diff --git a/www/class/config-generate/abstract/objectXML.class.php b/www/class/config-generate/abstract/objectXML.class.php index 406d8cb5a588f1726367cf45de19152e1b21a6e0..ec5b4605feb5c0f8fc15bd8da77fac95bd2abc3d 100644 --- a/www/class/config-generate/abstract/objectXML.class.php +++ b/www/class/config-generate/abstract/objectXML.class.php @@ -1,4 +1,37 @@ <?php +/** + * 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 <http://www.gnu.org/licenses>. + * + * 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. + * + * For more information : contact@centreon.com + * + */ abstract class AbstractObjectXML { protected $backend_instance = null; @@ -92,5 +125,3 @@ abstract class AbstractObjectXML { return $str; } } - -?> diff --git a/www/class/config-generate/abstract/service.class.php b/www/class/config-generate/abstract/service.class.php index 70e995695aa539b140586d07c1bce7c4874c6317..502de19550430fb896482f54f4b42d482a037c67 100644 --- a/www/class/config-generate/abstract/service.class.php +++ b/www/class/config-generate/abstract/service.class.php @@ -1,4 +1,37 @@ <?php +/** + * 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 <http://www.gnu.org/licenses>. + * + * 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. + * + * For more information : contact@centreon.com + * + */ require_once dirname(__FILE__) . '/object.class.php'; @@ -227,5 +260,3 @@ abstract class AbstractService extends AbstractObject { return null; } } - -?>