Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
Merge branch '2.7.x' of https://github.com/centreon/centreon into 2.7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinsivy committed Jul 7, 2016
2 parents 85a4f80 + 2dfbbf2 commit a19168c
Show file tree
Hide file tree
Showing 12 changed files with 154 additions and 20 deletions.
10 changes: 4 additions & 6 deletions bin/centreon
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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'])) {
Expand Down Expand Up @@ -192,5 +190,5 @@ if ($api->login == "" || $api->password == "") {
$api->setReturnCode(1);
}
}
$api->close();
?>

$api->close();
4 changes: 4 additions & 0 deletions doc/en/api/clapi/engine_management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Poller management
=================

.. note::

All actions have to be perform in user root

List available pollers
----------------------

Expand Down
4 changes: 4 additions & 0 deletions doc/en/exploitation_guide/Real_time_action.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
========

Expand Down
2 changes: 1 addition & 1 deletion doc/en/release_notes/centreon-2.7/centreon-2.7.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions doc/fr/api/clapi/engine_management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Poller management
=================

.. note::

All actions have to be perform in user root

List available pollers
----------------------

Expand Down
4 changes: 4 additions & 0 deletions doc/fr/exploitation_guide/Real_time_action.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
========

Expand Down
2 changes: 1 addition & 1 deletion doc/fr/release_notes/centreon-2.7/centreon-2.7.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions www/class/centreon-clapi/centreon.Config.Poller.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,6 @@ public function pollerGenerate($variables, $login, $password) {
$apacheUser = $this->getApacheUser();
$centreonGroup = $this->getCentreonGroup();

$oldMask = umask(0113);

$setFilesOwner = 1;
if ($apacheUser != "" && $centreonGroup != "") {

Expand Down Expand Up @@ -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;
}
Expand Down
35 changes: 33 additions & 2 deletions www/class/config-generate/abstract/host.class.php
Original file line number Diff line number Diff line change
@@ -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 : [email protected]
*
*/

require_once dirname(__FILE__) . '/object.class.php';

Expand Down Expand Up @@ -324,5 +357,3 @@ public function getString($host_id, $attr) {
return null;
}
}

?>
35 changes: 33 additions & 2 deletions www/class/config-generate/abstract/object.class.php
Original file line number Diff line number Diff line change
@@ -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 : [email protected]
*
*/

abstract class AbstractObject {
protected $backend_instance = null;
Expand Down Expand Up @@ -185,5 +218,3 @@ public function getExported() {
return array();
}
}

?>
35 changes: 33 additions & 2 deletions www/class/config-generate/abstract/objectXML.class.php
Original file line number Diff line number Diff line change
@@ -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 : [email protected]
*
*/

abstract class AbstractObjectXML {
protected $backend_instance = null;
Expand Down Expand Up @@ -92,5 +125,3 @@ protected function cleanStr($str) {
return $str;
}
}

?>
35 changes: 33 additions & 2 deletions www/class/config-generate/abstract/service.class.php
Original file line number Diff line number Diff line change
@@ -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 : [email protected]
*
*/

require_once dirname(__FILE__) . '/object.class.php';

Expand Down Expand Up @@ -227,5 +260,3 @@ public function getString($service_id, $attr) {
return null;
}
}

?>

0 comments on commit a19168c

Please sign in to comment.