From 045137da949b5722a9a91cd225a417575af52974 Mon Sep 17 00:00:00 2001 From: Julien Mathis Date: Thu, 7 Jul 2016 11:26:30 +0200 Subject: [PATCH 1/5] fix indentation problem --- bin/centreon | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bin/centreon b/bin/centreon index 5468002a78c..2a63071382a 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(); From 2385bd44f35e68b8db3bcc5c5ffa954521e94352 Mon Sep 17 00:00:00 2001 From: Julien Mathis Date: Thu, 7 Jul 2016 11:28:03 +0200 Subject: [PATCH 2/5] add headers --- .../config-generate/abstract/host.class.php | 35 +++++++++++++++++-- .../config-generate/abstract/object.class.php | 35 +++++++++++++++++-- .../abstract/objectXML.class.php | 35 +++++++++++++++++-- .../abstract/service.class.php | 35 +++++++++++++++++-- 4 files changed, 132 insertions(+), 8 deletions(-) diff --git a/www/class/config-generate/abstract/host.class.php b/www/class/config-generate/abstract/host.class.php index 57391a733d8..b25d3672a3e 100644 --- a/www/class/config-generate/abstract/host.class.php +++ b/www/class/config-generate/abstract/host.class.php @@ -1,4 +1,37 @@ . + * + * 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 @@ public function getString($host_id, $attr) { return null; } } - -?> diff --git a/www/class/config-generate/abstract/object.class.php b/www/class/config-generate/abstract/object.class.php index 7a82527410f..578dffcb23c 100644 --- a/www/class/config-generate/abstract/object.class.php +++ b/www/class/config-generate/abstract/object.class.php @@ -1,4 +1,37 @@ . + * + * 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 @@ public function getExported() { return array(); } } - -?> diff --git a/www/class/config-generate/abstract/objectXML.class.php b/www/class/config-generate/abstract/objectXML.class.php index 406d8cb5a58..ec5b4605feb 100644 --- a/www/class/config-generate/abstract/objectXML.class.php +++ b/www/class/config-generate/abstract/objectXML.class.php @@ -1,4 +1,37 @@ . + * + * 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 @@ protected function cleanStr($str) { return $str; } } - -?> diff --git a/www/class/config-generate/abstract/service.class.php b/www/class/config-generate/abstract/service.class.php index 70e995695aa..502de195504 100644 --- a/www/class/config-generate/abstract/service.class.php +++ b/www/class/config-generate/abstract/service.class.php @@ -1,4 +1,37 @@ . + * + * 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 @@ public function getString($service_id, $attr) { return null; } } - -?> From 4335f2c8b1b487fd3eb78097d2bcf3dcf5e1a745 Mon Sep 17 00:00:00 2001 From: Julien Mathis Date: Thu, 7 Jul 2016 11:28:41 +0200 Subject: [PATCH 3/5] revert --- www/class/centreon-clapi/centreon.Config.Poller.class.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/www/class/centreon-clapi/centreon.Config.Poller.class.php b/www/class/centreon-clapi/centreon.Config.Poller.class.php index a42eef8515d..0455d40290b 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 @@ public function pollerGenerate($variables, $login, $password) { $apacheUser = $this->getApacheUser(); $centreonGroup = $this->getCentreonGroup(); - $oldMask = umask(0113); - $setFilesOwner = 1; if ($apacheUser != "" && $centreonGroup != "") { @@ -448,8 +446,6 @@ public function pollerGenerate($variables, $login, $password) { 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; } From 8044b425d151c19f0d67b69d31f8fd3458e7641b Mon Sep 17 00:00:00 2001 From: rwerquin Date: Thu, 7 Jul 2016 11:49:07 +0200 Subject: [PATCH 4/5] little update in documentation --- doc/en/api/clapi/engine_management.rst | 4 ++++ doc/en/release_notes/centreon-2.7/centreon-2.7.5.rst | 2 +- doc/fr/api/clapi/engine_management.rst | 4 ++++ doc/fr/release_notes/centreon-2.7/centreon-2.7.5.rst | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/en/api/clapi/engine_management.rst b/doc/en/api/clapi/engine_management.rst index 8f98840a156..464206be4b6 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/release_notes/centreon-2.7/centreon-2.7.5.rst b/doc/en/release_notes/centreon-2.7/centreon-2.7.5.rst index dad018f5f7b..60553d87d2b 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 8f98840a156..464206be4b6 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/release_notes/centreon-2.7/centreon-2.7.5.rst b/doc/fr/release_notes/centreon-2.7/centreon-2.7.5.rst index dad018f5f7b..60553d87d2b 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 From 2dfbbf27b493cd04144b6edd8ae30b883e036b16 Mon Sep 17 00:00:00 2001 From: rwerquin Date: Thu, 7 Jul 2016 15:19:19 +0200 Subject: [PATCH 5/5] add downtime explanations in doc --- doc/en/exploitation_guide/Real_time_action.rst | 4 ++++ doc/fr/exploitation_guide/Real_time_action.rst | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/doc/en/exploitation_guide/Real_time_action.rst b/doc/en/exploitation_guide/Real_time_action.rst index d3b52ec99fb..60401284611 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/fr/exploitation_guide/Real_time_action.rst b/doc/fr/exploitation_guide/Real_time_action.rst index 0c1ac4d0f54..3179d428397 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 ========