Installation finie et Exploitation en cours 21-06-2013

git-svn-id: http://svn.merethis.net/centreon-esxd/trunk@56 a5eaa968-4c79-4d68-970d-af6011b5b055
This commit is contained in:
Stephane Duret 2013-06-21 15:40:00 +00:00
parent 5534b8c415
commit cd59d4ae57
25 changed files with 550 additions and 467 deletions

View File

@ -1,4 +1,4 @@
# Sphinx build info version 1 # Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 5c34505a03d196bacf5235352ea2ec0d config: 32c42c8fca5663d8b06feb85adcec649
tags: a205e9ed8462ae86fdd2f73488852ba9 tags: fbb0d17656682115ca4d033fb2f83ba1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -2,41 +2,41 @@
Exploitation Exploitation
============ ============
Présentation de Centreon-esxd Centreon-esxd Presentation
----------------------------- ---------------------------
Principes Généraux Generals Principles
`````````````````` ```````````````````
Centreon-esxd est un programme Perl chargé de récupérer des indicateurs VMWare. Ce programme utilise le SDK Perl fourni par VMWare afin de se connecter et récupérer les informations d'un (ou plusieurs) VirtualCenter. Pour cela il effectue une connexion TCP avec le(s) VirtualCenter. Centreon-esxd is a Perl program in charged to get back VMWare indicators. This program uses the SDK Perl provided by VMWare in order to connect and get back the informations of one (or more) Virtual Center. To do this, it makes a TCP connection with the VirtualCenter.
Par défaut, « centreon-esxd » lance au moins deux processus (nommé respectivement « handle-client », « handle-vsphere-xxxx ») : By default "centreon-esxd" starts at least two processes (named "handle-client" and "handle-vsphere-xxxx") :
 handle-client »*:  handle-client »*:
*Processus en attente des demandes des clients « centreon_esx_client.pl ».* *Process waiting for requests of "centron-esx-client.pl" clients.*
Voici le fonctionnement : Steps of operation :
- Un client se connecte. - A client connects.
- Le client demande un indicateur de supervision sur un VirtualCenter. - The client ask an monitoring indicator on a VirtualCenter.
- Le processus « handle-client » fourni cette demande au processus « handle-vsphere-xxxx ». - The process "handle-client" sends the request to process "handle-vsphere-xxxx".
- Une réponse est fournie par « handle-vsphere-xxxx » à « handle-client ». - A response is sent by "handle-vsphere-xxxx" to "handle-client".
- Le processus « handle-client » fourni la réponse au client. - The process "handle-client" sends the response to the client.
 handle-vsphere-xxxx »*:  handle-vsphere-xxxx »*:
*Processus ayant le rôle de se connecter et garder ouverte une session avec son VirtualCenter (De plus, dans un souci de performances, un cache de description des données de performances est créé).* *Process responsible to connect and to keep opened a session with the VirtualCenter. To ensure quality performance, a cache of datas description is created.*
Enfin, ce processus récupère les indicateurs VMWare en créant un sous-processus par demande. Then, this process gets back the VMWare indicators creating a subprocess per request.
Centreon-esxd nécessite impérativement l'utilisation d'un (ou plusieurs) VirtualCenter. Il n'est pas possible de récupérer les informations d'un serveur ESX directement. Centreon-esxd necessitates the utilization of one (or more) VirtualCenter. It isn't possible to get back informations of an ESX server directly.
Voici un exemple d'architecture éclaté : This is a example of a fragmented architecture :
.. image:: ../images/archi.png .. image:: ../images/archi.png
Mode de fonctionnement Operating mode
`````````````````````` ``````````````
Le programme « centreon-esxd » fonctionne uniquement en mode « daemon ». (dans le sens où il ne peut fournir les indicateurs sans l'utilisation d'un client). The "centreon-esxd" program only works in "daemon" mode. (dans le sens où il ne peut fournir les indicateurs sans l'utilisation d'un client).
Lors de l'utilisation du plugin *centreon_esx_client.pl*, on passe des chaînes de caractères qui vont être lier aux différentes librairies dans *"/usr/share/centreon/lib/centreon-esxd"* et qui va être ensuite communiquer au Vcenter qui va au final retourner le résultat au Client. Le client ouvre une liaison TCP avec le serveur pour récolter les informations nécessaires. Lors de l'utilisation du plugin *centreon_esx_client.pl*, on passe des chaînes de caractères qui vont être lier aux différentes librairies dans *"/usr/share/centreon/lib/centreon-esxd"* et qui va être ensuite communiquer au Vcenter qui va au final retourner le résultat au Client. Le client ouvre une liaison TCP avec le serveur pour récolter les informations nécessaires.

View File

@ -2,42 +2,42 @@
Installation Installation
============ ============
Pré-Requis Prerequisites
========== =============
Préconisations logicielles Software Recommandations
`````````````````````````` ````````````````````````
Le connecteur "centreon-esxd" est testé et validé sur des environnements Linux. The "centreon-esxd" connector has been tested on linux systems.
L'installation sur d'autres environnements n'est pas exclu mais non présenté dans ce document (Solaris, Windows, ...). Installation on other system is possible but is outside the scope of this document.
==================== ===================== ==================== =====================
Logiciels Version minimum Software Minimal Version
==================== ===================== ==================== =====================
VMWare SDK Perl 5.0 VMWare SDK Perl 5.0
Perl 5.8 Perl 5.8
centreon-esxd 1.3 centreon-esxd 1.3
==================== ===================== ==================== =====================
Préconisations matérielles Hardware Recommandations
`````````````````````````` ````````````````````````
Le matériel nécessaire dépend du nombre de demandes de vérifications. Par défaut, le connecteur n'effectue aucunes vérifications. Les ressources minimales sont de : Hardware prerequisites will vary depending on the number of monitored hosts. Without configured, no checks are done. Minimal used ressources are :
* mémoire vive : 512 Mo minimum (Peut sensiblement augmenter en fonction du nombre de contrôle). * RAM : 512 Mo (May slightly increase with the number of checks).
* CPU : même pré-requis que pour le serveur de collecte. * CPU : same as poller server.
Installation de centreon-esxd - Environnement centos/rhel 5 Centreon-esxd Installation - centos/rhel 5 systems
=========================================================== ==================================================
Installation du SDK Perl VMWare SDK Perl VMWare Installation
``````````````````````````````` ````````````````````````````
Le connecteur « centreon-esxd » utilise le SDK Perl VMWare pour son fonctionnement. Nous allons donc l'installer. Pour cela nous allons commencer par installer CPAN qui est le nom d'un module Perl qui rend aisés le téléchargement, l'installation, la mise à jour et la maintenance des autres modules Perl qui sont archivés sur le CPAN. The "centreon-esxd" connector uses SDK Perl VMWare for its operation. So we install it. To do this, we begin by install CPAN, it's the name of a Perl module who improves the download, the installation, the upgrade and the maintenance of others Perl modules who are archived on the CPAN.
Installer les pré-requis CPAN:: Install CPAN prerequisites ::
root # yum install gcc make unzip wget expat-devel e2fsprogs-devel openssl-devel root # yum install gcc make unzip wget expat-devel e2fsprogs-devel openssl-devel
root # yum install perl-XML-LibXML perl-Crypt-SSLeay root # yum install perl-XML-LibXML perl-Crypt-SSLeay
@ -54,41 +54,39 @@ Installer les pré-requis CPAN::
root # perl Makefile.PL root # perl Makefile.PL
root # make && make install root # make && make install
Nous avons notre environnement prêt pour l'installation du SDK VMWare. All SDK prerequisites are installed.
Télécharger la dernière version, correspondant à votre architecture 32/64 bits, sur le site officiel de VMWare (`SDK VMWare <http://www.vmware.com/support/developer/viperltoolkit/>`_). Download the last version on the VMWare website (`SDK VMWare <http://www.vmware.com/support/developer/viperltoolkit/>`_) (choose the file correponding to your architecture)
Installer le SDK Perl VMWare:: Install VMWare Perl SDK::
root # tar zxvf VMware-vSphere-Perl-SDK-5.1.0-780721.x86_64.tar.gz root # tar zxvf VMware-vSphere-Perl-SDK-5.1.0-780721.x86_64.tar.gz
root # cd vmware-vsphere-cli-distrib root # cd vmware-vsphere-cli-distrib
root # perl Makefile.pl root # perl Makefile.pl
root # make && make install root # make && make install
Installation de modules complémentaires Addtionnal Modules Installation
``````````````````````````````````````` ```````````````````````````````
Certains modules complémentaires Perl peuvent être installés si vous souhaitez utiliser certaines fonctionnalités du centreon_esxd : Some features require additionnal prerequisites.
Pour envoyer les logs au daemon « syslog », il est nécessaire d'installer le module « Unix::Syslog »:: To send data to a syslog daemon, the " Unix::Syslog" must be installed ::
root # cpan install Unix::Syslog root # cpan install Unix::Syslog
Pour vérifier la date des snapshots d'une machine virtuelle, il est nécessaire d'installer le module « DateTime::Format::ISO8601 » ( **ce module installe beaucoup de modules CPAN et est difficilement installable sans mettre à jour globalement « Perl ». Cette mise à jour est très risqué** ):: To check a virtual server snapshots date, the "DateTime::Format::ISO8601" is required (**be advise that this module has a lot of CPAN dependencies and may need a full Perl update. This update is hazardous**) ::
root # cpan install DateTime root # cpan install DateTime
root # cpan install DateTime::Format::ISO8601 root # cpan install DateTime::Format::ISO8601
root # o conf make /usr/bin/make root # o conf make /usr/bin/make
root # o conf commit root # o conf commit
Ensuite redémarrer votre système. Reboot your system to complete.
Installation de centreon-esxd centreon-esxd Installation
````````````````````````````` ``````````````````````````
Télécharger l'archive de « centreon-esxd ». Download « centreon-esxd » archive, then install ::
Installer les fichiers::
root # tar zxvf centreon-esxd-1.X.tar.gz root # tar zxvf centreon-esxd-1.X.tar.gz
root # cd centreon-esxd-1.X root # cd centreon-esxd-1.X
@ -101,24 +99,22 @@ Installer les fichiers::
root # mkdir -p /usr/share/centreon/lib/centreon-esxd root # mkdir -p /usr/share/centreon/lib/centreon-esxd
root # cp lib/* /usr/share/centreon/lib/centreon-esxd/ root # cp lib/* /usr/share/centreon/lib/centreon-esxd/
Activer le daemon « centreon-esxd » au démarrage:: Configure "centreon-esxd" daemon to start at boot ::
root # chkconfig --level 2345 centreon_esxd on root # chkconfig --level 2345 centreon_esxd on
*Le plugin « nagios » correspond au fichier « centreon_esx_client.pl ».* *"centreon_esx_client.pl" is the corresponding nagios plugin.*
Installation de centreon-esxd - Environnement centos/rhel 6 Centreon-esxd Installation - centos/rhel 6 systems
=========================================================== ==================================================
Installation du sdk Perl VMWare SDK Perl VMWare Installation
``````````````````````````````` `````````````````````````````
Le connecteur « centreon-esxd » utilise le SDK Perl VMWare pour son fonctionnement. The "centreon-esxd" connector uses SDK Perl VMWare for its operation. So we install it. To do this, we begin by install CPAN, it's the name of a Perl module who improves the download, the installation, the upgrade and the maintenance of others Perl modules who are archived on the CPAN.
Le connecteur « centreon-esxd » utilise le SDK Perl VMWare pour son fonctionnement. Nous allons donc l'installer. Pour cela nous allons commencer par installer CPAN qui est le nom d'un module Perl qui rend aisés le téléchargement, l'installation, la mise à jour et la maintenance des autres modules Perl qui sont archivés sur le CPAN. Install CPAN prerequisites ::
Installer les pré-requis CPAN::
root # yum install gcc make unzip wget expat-devel e2fsprogs-devel openssl-devel perl-CPAN libuuid-devel root # yum install gcc make unzip wget expat-devel e2fsprogs-devel openssl-devel perl-CPAN libuuid-devel
root # yum install perl-XML-LibXML perl-Crypt-SSLeay perl-Class-MethodMaker perl-SOAP-Lite root # yum install perl-XML-LibXML perl-Crypt-SSLeay perl-Class-MethodMaker perl-SOAP-Lite
@ -134,41 +130,39 @@ Installer les pré-requis CPAN::
root # perl Makefile.PL root # perl Makefile.PL
root # make && make install root # make && make install
Nous avons notre environnement prêt pour l'installation du SDK VMWare. All SDK prerequisites are installed.
Télécharger la dernière version, correspondant à votre architecture 32/64 bits, sur le site officiel de VMWare (`SDK VMWare <http://www.vmware.com/support/developer/viperltoolkit/>`_) Download the last version on the VMWare website (`SDK VMWare <http://www.vmware.com/support/developer/viperltoolkit/>`_) (choose the file correponding to your architecture)
Installer le SDK Perl VMWare:: Install VMWare Perl SDK::
root # tar zxvf VMware-vSphere-Perl-SDK-5.1.0-780721.x86_64.tar.gz root # tar zxvf VMware-vSphere-Perl-SDK-5.1.0-780721.x86_64.tar.gz
root # cd vmware-vsphere-cli-distrib root # cd vmware-vsphere-cli-distrib
root # perl Makefile.pl root # perl Makefile.pl
root # make && make install root # make && make install
Installation de modules complémentaires Addtionnal Modules Installation
``````````````````````````````````````` ```````````````````````````````
Certains modules complémentaires Perl peuvent être installés si vous souhaitez utiliser certaines fonctionnalités du centreon_esxd : Some features require additionnal prerequisites.
Pour envoyer les logs au daemon « syslog », il est nécessaire d'installer le module « Unix::Syslog »:: To send data to a syslog daemon, the " Unix::Syslog" must be installed ::
root # cpan install Unix::Syslog root # cpan install Unix::Syslog
Pour vérifier la date des snapshots d'une machine virtuelle, il est nécessaire d'installer le module « DateTime::Format::ISO8601 » ( **ce module installe beaucoup de modules CPAN et est difficilement installable sans mettre à jour globalement « Perl ». Cette mise à jour est très risqué** ):: To check a virtual server snapshots date, the "DateTime::Format::ISO8601" is required (**be advise that this module has a lot of CPAN dependencies and may need a full Perl update. This update is hazardous**) ::
root # cpan install DateTime root # cpan install DateTime
root # cpan install DateTime::Format::ISO8601 root # cpan install DateTime::Format::ISO8601
root # o conf make /usr/bin/make root # o conf make /usr/bin/make
root # o conf commit root # o conf commit
Ensuite redémarrer votre système. Reboot your system to complete.
Installation de centreon-esxd centreon-esxd Installation
````````````````````````````` ``````````````````````````
Télécharger l'archive de « centreon-esxd ». Download « centreon-esxd » archive, then install ::
Installer les fichiers::
root # tar zxvf centreon-esxd-1.X.tar.gz root # tar zxvf centreon-esxd-1.X.tar.gz
root # cd centreon-esxd-1.X root # cd centreon-esxd-1.X
@ -181,11 +175,10 @@ Installer les fichiers::
root # mkdir -p /usr/share/centreon/lib/centreon-esxd root # mkdir -p /usr/share/centreon/lib/centreon-esxd
root # cp lib/* /usr/share/centreon/lib/centreon-esxd/ root # cp lib/* /usr/share/centreon/lib/centreon-esxd/
Activer le daemon « centreon-esxd » au démarrage:: Configure "centreon-esxd" daemon to start at boot ::
root # chkconfig --level 2345 centreon_esxd on root # chkconfig --level 2345 centreon_esxd on
*Le plugin « nagios » correspond au fichier « centreon_esx_client.pl ».* *"centreon_esx_client.pl" is the corresponding nagios plugin.*

View File

@ -4,7 +4,7 @@
* *
* Sphinx stylesheet -- basic theme. * Sphinx stylesheet -- basic theme.
* *
* :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details. * :license: BSD, see LICENSE for details.
* *
*/ */

View File

@ -4,7 +4,7 @@
* *
* Sphinx stylesheet -- default theme. * Sphinx stylesheet -- default theme.
* *
* :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details. * :license: BSD, see LICENSE for details.
* *
*/ */

View File

@ -4,7 +4,7 @@
* *
* Sphinx JavaScript utilities for all documentation. * Sphinx JavaScript utilities for all documentation.
* *
* :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details. * :license: BSD, see LICENSE for details.
* *
*/ */
@ -32,7 +32,7 @@ if (!window.console || !console.firebug) {
*/ */
jQuery.urldecode = function(x) { jQuery.urldecode = function(x) {
return decodeURIComponent(x).replace(/\+/g, ' '); return decodeURIComponent(x).replace(/\+/g, ' ');
}; }
/** /**
* small helper function to urlencode strings * small helper function to urlencode strings
@ -61,6 +61,18 @@ jQuery.getQueryParameters = function(s) {
return result; return result;
}; };
/**
* small function to check if an array contains
* a given item.
*/
jQuery.contains = function(arr, item) {
for (var i = 0; i < arr.length; i++) {
if (arr[i] == item)
return true;
}
return false;
};
/** /**
* highlight a given string on a jquery object by wrapping it in * highlight a given string on a jquery object by wrapping it in
* span elements with the given class name. * span elements with the given class name.

File diff suppressed because one or more lines are too long

View File

@ -4,11 +4,38 @@
* *
* Sphinx JavaScript utilties for the full-text search. * Sphinx JavaScript utilties for the full-text search.
* *
* :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details. * :license: BSD, see LICENSE for details.
* *
*/ */
/**
* helper function to return a node containing the
* search summary for a given text. keywords is a list
* of stemmed words, hlwords is the list of normal, unstemmed
* words. the first one is used to find the occurance, the
* latter for highlighting it.
*/
jQuery.makeSearchSummary = function(text, keywords, hlwords) {
var textLower = text.toLowerCase();
var start = 0;
$.each(keywords, function() {
var i = textLower.indexOf(this.toLowerCase());
if (i > -1)
start = i;
});
start = Math.max(start - 120, 0);
var excerpt = ((start > 0) ? '...' : '') +
$.trim(text.substr(start, 240)) +
((start + 240 - text.length) ? '...' : '');
var rv = $('<div class="context"></div>').text(excerpt);
$.each(hlwords, function() {
rv = rv.highlightText(this, 'highlighted');
});
return rv;
}
/** /**
* Porter Stemmer * Porter Stemmer
@ -193,38 +220,6 @@ var Stemmer = function() {
} }
/**
* Simple result scoring code.
*/
var Scorer = {
// Implement the following function to further tweak the score for each result
// The function takes a result array [filename, title, anchor, descr, score]
// and returns the new score.
/*
score: function(result) {
return result[4];
},
*/
// query matches the full name of an object
objNameMatch: 11,
// or matches in the last dotted part of the object name
objPartialMatch: 6,
// Additive scores depending on the priority of the object
objPrio: {0: 15, // used to be importantResults
1: 5, // used to be objectResults
2: -5}, // used to be unimportantResults
// Used when the priority is not in the mapping.
objPrioDefault: 0,
// query found in title
title: 15,
// query found in terms
term: 5
};
/** /**
* Search Module * Search Module
*/ */
@ -244,13 +239,8 @@ var Search = {
}, },
loadIndex : function(url) { loadIndex : function(url) {
$.ajax({type: "GET", url: url, data: null, $.ajax({type: "GET", url: url, data: null, success: null,
dataType: "script", cache: true, dataType: "script", cache: true});
complete: function(jqxhr, textstatus) {
if (textstatus != "success") {
document.getElementById("searchindexloader").src = url;
}
}});
}, },
setIndex : function(index) { setIndex : function(index) {
@ -278,20 +268,19 @@ var Search = {
if (this._pulse_status >= 0) if (this._pulse_status >= 0)
return; return;
function pulse() { function pulse() {
var i;
Search._pulse_status = (Search._pulse_status + 1) % 4; Search._pulse_status = (Search._pulse_status + 1) % 4;
var dotString = ''; var dotString = '';
for (i = 0; i < Search._pulse_status; i++) for (var i = 0; i < Search._pulse_status; i++)
dotString += '.'; dotString += '.';
Search.dots.text(dotString); Search.dots.text(dotString);
if (Search._pulse_status > -1) if (Search._pulse_status > -1)
window.setTimeout(pulse, 500); window.setTimeout(pulse, 500);
} };
pulse(); pulse();
}, },
/** /**
* perform a search for something (or wait until index is loaded) * perform a search for something
*/ */
performSearch : function(query) { performSearch : function(query) {
// create the required interface elements // create the required interface elements
@ -311,46 +300,41 @@ var Search = {
this.deferQuery(query); this.deferQuery(query);
}, },
/**
* execute search (requires search index to be loaded)
*/
query : function(query) { query : function(query) {
var i; var stopwords = ["and","then","into","it","as","are","in","if","for","no","there","their","was","is","be","to","that","but","they","not","such","with","by","a","on","these","of","will","this","near","the","or","at"];
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
// stem the searchterms and add them to the correct list // Stem the searchterms and add them to the correct list
var stemmer = new Stemmer(); var stemmer = new Stemmer();
var searchterms = []; var searchterms = [];
var excluded = []; var excluded = [];
var hlterms = []; var hlterms = [];
var tmp = query.split(/\s+/); var tmp = query.split(/\s+/);
var objectterms = []; var objectterms = [];
for (i = 0; i < tmp.length; i++) { for (var i = 0; i < tmp.length; i++) {
if (tmp[i] !== "") { if (tmp[i] != "") {
objectterms.push(tmp[i].toLowerCase()); objectterms.push(tmp[i].toLowerCase());
} }
if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\d+$/) || if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\d+$/) ||
tmp[i] === "") { tmp[i] == "") {
// skip this "word" // skip this "word"
continue; continue;
} }
// stem the word // stem the word
var word = stemmer.stemWord(tmp[i]).toLowerCase(); var word = stemmer.stemWord(tmp[i]).toLowerCase();
var toAppend;
// select the correct list // select the correct list
if (word[0] == '-') { if (word[0] == '-') {
toAppend = excluded; var toAppend = excluded;
word = word.substr(1); word = word.substr(1);
} }
else { else {
toAppend = searchterms; var toAppend = searchterms;
hlterms.push(tmp[i].toLowerCase()); hlterms.push(tmp[i].toLowerCase());
} }
// only add if not already in the list // only add if not already in the list
if (!$u.contains(toAppend, word)) if (!$.contains(toAppend, word))
toAppend.push(word); toAppend.push(word);
} };
var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" ")); var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
// console.debug('SEARCH: searching for:'); // console.debug('SEARCH: searching for:');
@ -358,51 +342,89 @@ var Search = {
// console.info('excluded: ', excluded); // console.info('excluded: ', excluded);
// prepare search // prepare search
var filenames = this._index.filenames;
var titles = this._index.titles;
var terms = this._index.terms; var terms = this._index.terms;
var titleterms = this._index.titleterms; var fileMap = {};
var files = null;
// array of [filename, title, anchor, descr, score] // different result priorities
var results = []; var importantResults = [];
var objectResults = [];
var regularResults = [];
var unimportantResults = [];
$('#search-progress').empty(); $('#search-progress').empty();
// lookup as object // lookup as object
for (i = 0; i < objectterms.length; i++) { for (var i = 0; i < objectterms.length; i++) {
var others = [].concat(objectterms.slice(0, i), var others = [].concat(objectterms.slice(0,i),
objectterms.slice(i+1, objectterms.length)); objectterms.slice(i+1, objectterms.length))
results = results.concat(this.performObjectSearch(objectterms[i], others)); var results = this.performObjectSearch(objectterms[i], others);
// Assume first word is most likely to be the object,
// other words more likely to be in description.
// Therefore put matches for earlier words first.
// (Results are eventually used in reverse order).
objectResults = results[0].concat(objectResults);
importantResults = results[1].concat(importantResults);
unimportantResults = results[2].concat(unimportantResults);
} }
// lookup as search terms in fulltext // perform the search on the required terms
results = results.concat(this.performTermsSearch(searchterms, excluded, terms, Scorer.term)) for (var i = 0; i < searchterms.length; i++) {
.concat(this.performTermsSearch(searchterms, excluded, titleterms, Scorer.title)); var word = searchterms[i];
// no match but word was a required one
// let the scorer override scores with a custom scoring function if ((files = terms[word]) == null)
if (Scorer.score) { break;
for (i = 0; i < results.length; i++) if (files.length == undefined) {
results[i][4] = Scorer.score(results[i]); files = [files];
}
// now sort the results by score (in opposite order of appearance, since the
// display function below uses pop() to retrieve items) and then
// alphabetically
results.sort(function(a, b) {
var left = a[4];
var right = b[4];
if (left > right) {
return 1;
} else if (left < right) {
return -1;
} else {
// same score: sort alphabetically
left = a[1].toLowerCase();
right = b[1].toLowerCase();
return (left > right) ? -1 : ((left < right) ? 1 : 0);
} }
// create the mapping
for (var j = 0; j < files.length; j++) {
var file = files[j];
if (file in fileMap)
fileMap[file].push(word);
else
fileMap[file] = [word];
}
}
// now check if the files don't contain excluded terms
for (var file in fileMap) {
var valid = true;
// check if all requirements are matched
if (fileMap[file].length != searchterms.length)
continue;
// ensure that none of the excluded terms is in the
// search result.
for (var i = 0; i < excluded.length; i++) {
if (terms[excluded[i]] == file ||
$.contains(terms[excluded[i]] || [], file)) {
valid = false;
break;
}
}
// if we have still a valid result we can add it
// to the result list
if (valid)
regularResults.push([filenames[file], titles[file], '', null]);
}
// delete unused variables in order to not waste
// memory until list is retrieved completely
delete filenames, titles, terms;
// now sort the regular results descending by title
regularResults.sort(function(a, b) {
var left = a[1].toLowerCase();
var right = b[1].toLowerCase();
return (left > right) ? -1 : ((left < right) ? 1 : 0);
}); });
// for debugging // combine all results
//Search.lastresults = results.slice(); // a copy var results = unimportantResults.concat(regularResults)
//console.info('search results:', Search.lastresults); .concat(objectResults).concat(importantResults);
// print the results // print the results
var resultCount = results.length; var resultCount = results.length;
@ -411,7 +433,7 @@ var Search = {
if (results.length) { if (results.length) {
var item = results.pop(); var item = results.pop();
var listItem = $('<li style="display:none"></li>'); var listItem = $('<li style="display:none"></li>');
if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') { if (DOCUMENTATION_OPTIONS.FILE_SUFFIX == '') {
// dirhtml builder // dirhtml builder
var dirname = item[0] + '/'; var dirname = item[0] + '/';
if (dirname.match(/\/index\/$/)) { if (dirname.match(/\/index\/$/)) {
@ -435,18 +457,16 @@ var Search = {
displayNextItem(); displayNextItem();
}); });
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) { } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
$.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[0] + '.txt', $.get(DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' +
dataType: "text", item[0] + '.txt', function(data) {
complete: function(jqxhr, textstatus) { if (data != '') {
var data = jqxhr.responseText; listItem.append($.makeSearchSummary(data, searchterms, hlterms));
if (data !== '') { Search.output.append(listItem);
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms)); }
} listItem.slideDown(5, function() {
Search.output.append(listItem); displayNextItem();
listItem.slideDown(5, function() { });
displayNextItem(); }, "text");
});
}});
} else { } else {
// no source available, just display title // no source available, just display title
Search.output.append(listItem); Search.output.append(listItem);
@ -469,32 +489,20 @@ var Search = {
displayNextItem(); displayNextItem();
}, },
/**
* search for object names
*/
performObjectSearch : function(object, otherterms) { performObjectSearch : function(object, otherterms) {
var filenames = this._index.filenames; var filenames = this._index.filenames;
var objects = this._index.objects; var objects = this._index.objects;
var objnames = this._index.objnames; var objnames = this._index.objnames;
var titles = this._index.titles; var titles = this._index.titles;
var i; var importantResults = [];
var results = []; var objectResults = [];
var unimportantResults = [];
for (var prefix in objects) { for (var prefix in objects) {
for (var name in objects[prefix]) { for (var name in objects[prefix]) {
var fullname = (prefix ? prefix + '.' : '') + name; var fullname = (prefix ? prefix + '.' : '') + name;
if (fullname.toLowerCase().indexOf(object) > -1) { if (fullname.toLowerCase().indexOf(object) > -1) {
var score = 0;
var parts = fullname.split('.');
// check for different match types: exact matches of full name or
// "last name" (i.e. last dotted part)
if (fullname == object || parts[parts.length - 1] == object) {
score += Scorer.objNameMatch;
// matches in last name
} else if (parts[parts.length - 1].indexOf(object) > -1) {
score += Scorer.objPartialMatch;
}
var match = objects[prefix][name]; var match = objects[prefix][name];
var objname = objnames[match[1]][2]; var objname = objnames[match[1]][2];
var title = titles[match[0]]; var title = titles[match[0]];
@ -504,7 +512,7 @@ var Search = {
var haystack = (prefix + ' ' + name + ' ' + var haystack = (prefix + ' ' + name + ' ' +
objname + ' ' + title).toLowerCase(); objname + ' ' + title).toLowerCase();
var allfound = true; var allfound = true;
for (i = 0; i < otherterms.length; i++) { for (var i = 0; i < otherterms.length; i++) {
if (haystack.indexOf(otherterms[i]) == -1) { if (haystack.indexOf(otherterms[i]) == -1) {
allfound = false; allfound = false;
break; break;
@ -515,107 +523,37 @@ var Search = {
} }
} }
var descr = objname + _(', in ') + title; var descr = objname + _(', in ') + title;
anchor = match[3];
var anchor = match[3]; if (anchor == '')
if (anchor === '')
anchor = fullname; anchor = fullname;
else if (anchor == '-') else if (anchor == '-')
anchor = objnames[match[1]][1] + '-' + fullname; anchor = objnames[match[1]][1] + '-' + fullname;
// add custom score for some objects according to scorer result = [filenames[match[0]], fullname, '#'+anchor, descr];
if (Scorer.objPrio.hasOwnProperty(match[2])) { switch (match[2]) {
score += Scorer.objPrio[match[2]]; case 1: objectResults.push(result); break;
} else { case 0: importantResults.push(result); break;
score += Scorer.objPrioDefault; case 2: unimportantResults.push(result); break;
} }
results.push([filenames[match[0]], fullname, '#'+anchor, descr, score]);
} }
} }
} }
return results; // sort results descending
}, objectResults.sort(function(a, b) {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
/**
* search for full-text terms in the index
*/
performTermsSearch : function(searchterms, excluded, terms, score) {
var filenames = this._index.filenames;
var titles = this._index.titles;
var i, j, file, files;
var fileMap = {};
var results = [];
// perform the search on the required terms
for (i = 0; i < searchterms.length; i++) {
var word = searchterms[i];
// no match but word was a required one
if (!(files = terms[word]))
break;
if (files.length === undefined) {
files = [files];
}
// create the mapping
for (j = 0; j < files.length; j++) {
file = files[j];
if (file in fileMap)
fileMap[file].push(word);
else
fileMap[file] = [word];
}
}
// now check if the files don't contain excluded terms
for (file in fileMap) {
var valid = true;
// check if all requirements are matched
if (fileMap[file].length != searchterms.length)
continue;
// ensure that none of the excluded terms is in the search result
for (i = 0; i < excluded.length; i++) {
if (terms[excluded[i]] == file ||
$u.contains(terms[excluded[i]] || [], file)) {
valid = false;
break;
}
}
// if we have still a valid result we can add it to the result list
if (valid) {
results.push([filenames[file], titles[file], '', null, score]);
}
}
return results;
},
/**
* helper function to return a node containing the
* search summary for a given text. keywords is a list
* of stemmed words, hlwords is the list of normal, unstemmed
* words. the first one is used to find the occurance, the
* latter for highlighting it.
*/
makeSearchSummary : function(text, keywords, hlwords) {
var textLower = text.toLowerCase();
var start = 0;
$.each(keywords, function() {
var i = textLower.indexOf(this.toLowerCase());
if (i > -1)
start = i;
}); });
start = Math.max(start - 120, 0);
var excerpt = ((start > 0) ? '...' : '') + importantResults.sort(function(a, b) {
$.trim(text.substr(start, 240)) + return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
((start + 240 - text.length) ? '...' : '');
var rv = $('<div class="context"></div>').text(excerpt);
$.each(hlwords, function() {
rv = rv.highlightText(this, 'highlighted');
}); });
return rv;
unimportantResults.sort(function(a, b) {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
});
return [importantResults, objectResults, unimportantResults]
} }
}; }
$(document).ready(function() { $(document).ready(function() {
Search.init(); Search.init();

View File

@ -16,20 +16,12 @@
* Once the browser is closed the cookie is deleted and the position * Once the browser is closed the cookie is deleted and the position
* reset to the default (expanded). * reset to the default (expanded).
* *
* :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details. * :license: BSD, see LICENSE for details.
* *
*/ */
$(function() { $(function() {
// global elements used by the functions. // global elements used by the functions.
// the 'sidebarbutton' element is defined as global after its // the 'sidebarbutton' element is defined as global after its
// creation, in the add_sidebar_button function // creation, in the add_sidebar_button function

View File

@ -1,31 +1,23 @@
// Underscore.js 1.3.1 // Underscore.js 0.5.5
// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc. // (c) 2009 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore is freely distributable under the MIT license. // Underscore is freely distributable under the terms of the MIT license.
// Portions of Underscore are inspired or borrowed from Prototype, // Portions of Underscore are inspired by or borrowed from Prototype.js,
// Oliver Steele's Functional, and John Resig's Micro-Templating. // Oliver Steele's Functional, and John Resig's Micro-Templating.
// For all details and documentation: // For all details and documentation:
// http://documentcloud.github.com/underscore // http://documentcloud.github.com/underscore/
(function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source== (function(){var j=this,n=j._,i=function(a){this._wrapped=a},m=typeof StopIteration!=="undefined"?StopIteration:"__break__",b=j._=function(a){return new i(a)};if(typeof exports!=="undefined")exports._=b;var k=Array.prototype.slice,o=Array.prototype.unshift,p=Object.prototype.toString,q=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;b.VERSION="0.5.5";b.each=function(a,c,d){try{if(a.forEach)a.forEach(c,d);else if(b.isArray(a)||b.isArguments(a))for(var e=0,f=a.length;e<f;e++)c.call(d,
c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c, a[e],e,a);else{var g=b.keys(a);f=g.length;for(e=0;e<f;e++)c.call(d,a[g[e]],g[e],a)}}catch(h){if(h!=m)throw h;}return a};b.map=function(a,c,d){if(a&&b.isFunction(a.map))return a.map(c,d);var e=[];b.each(a,function(f,g,h){e.push(c.call(d,f,g,h))});return e};b.reduce=function(a,c,d,e){if(a&&b.isFunction(a.reduce))return a.reduce(b.bind(d,e),c);b.each(a,function(f,g,h){c=d.call(e,c,f,g,h)});return c};b.reduceRight=function(a,c,d,e){if(a&&b.isFunction(a.reduceRight))return a.reduceRight(b.bind(d,e),c);
h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each= var f=b.clone(b.toArray(a)).reverse();b.each(f,function(g,h){c=d.call(e,c,g,h,a)});return c};b.detect=function(a,c,d){var e;b.each(a,function(f,g,h){if(c.call(d,f,g,h)){e=f;b.breakLoop()}});return e};b.select=function(a,c,d){if(a&&b.isFunction(a.filter))return a.filter(c,d);var e=[];b.each(a,function(f,g,h){c.call(d,f,g,h)&&e.push(f)});return e};b.reject=function(a,c,d){var e=[];b.each(a,function(f,g,h){!c.call(d,f,g,h)&&e.push(f)});return e};b.all=function(a,c,d){c=c||b.identity;if(a&&b.isFunction(a.every))return a.every(c,
b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e<f;e++){if(e in a&&c.call(d,a[e],e,a)===n)break}else for(e in a)if(b.has(a,e)&&c.call(d,a[e],e,a)===n)break};b.map=b.collect=function(a,c,b){var e=[];if(a==null)return e;if(x&&a.map===x)return a.map(c,b);j(a,function(a,g,h){e[e.length]=c.call(b,a,g,h)});if(a.length===+a.length)e.length=a.length;return e};b.reduce=b.foldl=b.inject=function(a,c,d,e){var f=arguments.length>2;a== d);var e=true;b.each(a,function(f,g,h){(e=e&&c.call(d,f,g,h))||b.breakLoop()});return e};b.any=function(a,c,d){c=c||b.identity;if(a&&b.isFunction(a.some))return a.some(c,d);var e=false;b.each(a,function(f,g,h){if(e=c.call(d,f,g,h))b.breakLoop()});return e};b.include=function(a,c){if(b.isArray(a))return b.indexOf(a,c)!=-1;var d=false;b.each(a,function(e){if(d=e===c)b.breakLoop()});return d};b.invoke=function(a,c){var d=b.rest(arguments,2);return b.map(a,function(e){return(c?e[c]:e).apply(e,d)})};b.pluck=
null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect= function(a,c){return b.map(a,function(d){return d[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);var e={computed:-Infinity};b.each(a,function(f,g,h){g=c?c.call(d,f,g,h):f;g>=e.computed&&(e={value:f,computed:g})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);var e={computed:Infinity};b.each(a,function(f,g,h){g=c?c.call(d,f,g,h):f;g<e.computed&&(e={value:f,computed:g})});return e.value};b.sortBy=function(a,c,d){return b.pluck(b.map(a,
function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e= function(e,f,g){return{value:e,criteria:c.call(d,e,f,g)}}).sort(function(e,f){e=e.criteria;f=f.criteria;return e<f?-1:e>f?1:0}),"value")};b.sortedIndex=function(a,c,d){d=d||b.identity;for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?(e=g+1):(f=g)}return e};b.toArray=function(a){if(!a)return[];if(a.toArray)return a.toArray();if(b.isArray(a))return a;if(b.isArguments(a))return k.call(a);return b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=function(a,c,d){return c&&!d?k.call(a,
e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck= 0,c):a[0]};b.rest=function(a,c,d){return k.call(a,b.isUndefined(c)||d?1:c)};b.last=function(a){return a[a.length-1]};b.compact=function(a){return b.select(a,function(c){return!!c})};b.flatten=function(a){return b.reduce(a,[],function(c,d){if(b.isArray(d))return c.concat(b.flatten(d));c.push(d);return c})};b.without=function(a){var c=b.rest(arguments);return b.select(a,function(d){return!b.include(c,d)})};b.uniq=function(a,c){return b.reduce(a,[],function(d,e,f){if(0==f||(c===true?b.last(d)!=e:!b.include(d,
function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b<e.computed&&(e={value:a,computed:b})}); e)))d.push(e);return d})};b.intersect=function(a){var c=b.rest(arguments);return b.select(b.uniq(a),function(d){return b.all(c,function(e){return b.indexOf(e,d)>=0})})};b.zip=function(){for(var a=b.toArray(arguments),c=b.max(b.pluck(a,"length")),d=new Array(c),e=0;e<c;e++)d[e]=b.pluck(a,String(e));return d};b.indexOf=function(a,c){if(a.indexOf)return a.indexOf(c);for(var d=0,e=a.length;d<e;d++)if(a[d]===c)return d;return-1};b.lastIndexOf=function(a,c){if(a.lastIndexOf)return a.lastIndexOf(c);for(var d=
return e.value};b.shuffle=function(a){var b=[],d;j(a,function(a,f){f==0?b[0]=a:(d=Math.floor(Math.random()*(f+1)),b[f]=b[d],b[d]=a)});return b};b.sortBy=function(a,c,d){return b.pluck(b.map(a,function(a,b,g){return{value:a,criteria:c.call(d,a,b,g)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c<d?-1:c>d?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a, a.length;d--;)if(a[d]===c)return d;return-1};b.range=function(a,c,d){var e=b.toArray(arguments),f=e.length<=1;a=f?0:e[0];c=f?e[0]:e[1];d=e[2]||1;e=Math.ceil((c-a)/d);if(e<=0)return[];e=new Array(e);f=a;for(var g=0;1;f+=d){if((d>0?f-c:c-f)>=0)return e;e[g++]=f}};b.bind=function(a,c){var d=b.rest(arguments,2);return function(){return a.apply(c||j,d.concat(b.toArray(arguments)))}};b.bindAll=function(a){var c=b.rest(arguments);if(c.length==0)c=b.functions(a);b.each(c,function(d){a[d]=b.bind(a[d],a)});
c,d){d||(d=b.identity);for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?e=g+1:f=g}return e};b.toArray=function(a){return!a?[]:a.toArray?a.toArray():b.isArray(a)?i.call(a):b.isArguments(a)?i.call(a):b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=b.head=function(a,b,d){return b!=null&&!d?i.call(a,0,b):a[0]};b.initial=function(a,b,d){return i.call(a,0,a.length-(b==null||d?1:b))};b.last=function(a,b,d){return b!=null&&!d?i.call(a,Math.max(a.length-b,0)):a[a.length-1]};b.rest= return a};b.delay=function(a,c){var d=b.rest(arguments,2);return setTimeout(function(){return a.apply(a,d)},c)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(b.rest(arguments)))};b.wrap=function(a,c){return function(){var d=[a].concat(b.toArray(arguments));return c.apply(c,d)}};b.compose=function(){var a=b.toArray(arguments);return function(){for(var c=b.toArray(arguments),d=a.length-1;d>=0;d--)c=[a[d].apply(this,c)];return c[0]}};b.keys=function(a){if(b.isArray(a))return b.range(0,a.length);
b.tail=function(a,b,d){return i.call(a,b==null||d?1:b)};b.compact=function(a){return b.filter(a,function(a){return!!a})};b.flatten=function(a,c){return b.reduce(a,function(a,e){if(b.isArray(e))return a.concat(c?e:b.flatten(e));a[a.length]=e;return a},[])};b.without=function(a){return b.difference(a,i.call(arguments,1))};b.uniq=b.unique=function(a,c,d){var d=d?b.map(a,d):a,e=[];b.reduce(d,function(d,g,h){if(0==h||(c===true?b.last(d)!=g:!b.include(d,g)))d[d.length]=g,e[e.length]=a[h];return d},[]); var c=[];for(var d in a)q.call(a,d)&&c.push(d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=function(a){return b.select(b.keys(a),function(c){return b.isFunction(a[c])}).sort()};b.extend=function(a,c){for(var d in c)a[d]=c[d];return a};b.clone=function(a){if(b.isArray(a))return a.slice(0);return b.extend({},a)};b.tap=function(a,c){c(a);return a};b.isEqual=function(a,c){if(a===c)return true;var d=typeof a;if(d!=typeof c)return false;if(a==c)return true;if(!a&&c||a&&!c)return false;
return e};b.union=function(){return b.uniq(b.flatten(arguments,true))};b.intersection=b.intersect=function(a){var c=i.call(arguments,1);return b.filter(b.uniq(a),function(a){return b.every(c,function(c){return b.indexOf(c,a)>=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e<c;e++)d[e]=b.pluck(a,""+e);return d};b.indexOf=function(a,c, if(a.isEqual)return a.isEqual(c);if(b.isDate(a)&&b.isDate(c))return a.getTime()===c.getTime();if(b.isNaN(a)&&b.isNaN(c))return true;if(b.isRegExp(a)&&b.isRegExp(c))return a.source===c.source&&a.global===c.global&&a.ignoreCase===c.ignoreCase&&a.multiline===c.multiline;if(d!=="object")return false;if(a.length&&a.length!==c.length)return false;d=b.keys(a);var e=b.keys(c);if(d.length!=e.length)return false;for(var f in a)if(!b.isEqual(a[f],c[f]))return false;return true};b.isEmpty=function(a){return b.keys(a).length==
d){if(a==null)return-1;var e;if(d)return d=b.sortedIndex(a,c),a[d]===c?d:-1;if(p&&a.indexOf===p)return a.indexOf(c);for(d=0,e=a.length;d<e;d++)if(d in a&&a[d]===c)return d;return-1};b.lastIndexOf=function(a,b){if(a==null)return-1;if(D&&a.lastIndexOf===D)return a.lastIndexOf(b);for(var d=a.length;d--;)if(d in a&&a[d]===b)return d;return-1};b.range=function(a,b,d){arguments.length<=1&&(b=a||0,a=0);for(var d=arguments[2]||1,e=Math.max(Math.ceil((b-a)/d),0),f=0,g=Array(e);f<e;)g[f++]=a,a+=d;return g}; 0};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=function(a){return!!(a&&a.concat&&a.unshift)};b.isArguments=function(a){return a&&b.isNumber(a.length)&&!b.isArray(a)&&!r.call(a,"length")};b.isFunction=function(a){return!!(a&&a.constructor&&a.call&&a.apply)};b.isString=function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)};b.isNumber=function(a){return p.call(a)==="[object Number]"};b.isDate=function(a){return!!(a&&a.getTimezoneOffset&&a.setUTCFullYear)};b.isRegExp=function(a){return!!(a&&
var F=function(){};b.bind=function(a,c){var d,e;if(a.bind===s&&s)return s.apply(a,i.call(arguments,1));if(!b.isFunction(a))throw new TypeError;e=i.call(arguments,2);return d=function(){if(!(this instanceof d))return a.apply(c,e.concat(i.call(arguments)));F.prototype=a.prototype;var b=new F,g=a.apply(b,e.concat(i.call(arguments)));return Object(g)===g?g:b}};b.bindAll=function(a){var c=i.call(arguments,1);c.length==0&&(c=b.functions(a));j(c,function(c){a[c]=b.bind(a[c],a)});return a};b.memoize=function(a, a.test&&a.exec&&(a.ignoreCase||a.ignoreCase===false))};b.isNaN=function(a){return b.isNumber(a)&&isNaN(a)};b.isNull=function(a){return a===null};b.isUndefined=function(a){return typeof a=="undefined"};b.noConflict=function(){j._=n;return this};b.identity=function(a){return a};b.breakLoop=function(){throw m;};var s=0;b.uniqueId=function(a){var c=s++;return a?a+c:c};b.template=function(a,c){a=new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+a.replace(/[\r\t\n]/g,
c){var d={};c||(c=b.identity);return function(){var e=c.apply(this,arguments);return b.has(d,e)?d[e]:d[e]=a.apply(this,arguments)}};b.delay=function(a,b){var d=i.call(arguments,2);return setTimeout(function(){return a.apply(a,d)},b)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(i.call(arguments,1)))};b.throttle=function(a,c){var d,e,f,g,h,i=b.debounce(function(){h=g=false},c);return function(){d=this;e=arguments;var b;f||(f=setTimeout(function(){f=null;h&&a.apply(d,e);i()},c));g?h=true: " ").replace(/'(?=[^%]*%>)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<%=(.+?)%>/g,"',$1,'").split("<%").join("');").split("%>").join("p.push('")+"');}return p.join('');");return c?a(c):a};b.forEach=b.each;b.foldl=b.inject=b.reduce;b.foldr=b.reduceRight;b.filter=b.select;b.every=b.all;b.some=b.any;b.head=b.first;b.tail=b.rest;b.methods=b.functions;var l=function(a,c){return c?b(a).chain():a};b.each(b.functions(b),function(a){var c=b[a];i.prototype[a]=function(){var d=b.toArray(arguments);
a.apply(d,e);i();g=true}};b.debounce=function(a,b){var d;return function(){var e=this,f=arguments;clearTimeout(d);d=setTimeout(function(){d=null;a.apply(e,f)},b)}};b.once=function(a){var b=false,d;return function(){if(b)return d;b=true;return d=a.apply(this,arguments)}};b.wrap=function(a,b){return function(){var d=[a].concat(i.call(arguments,0));return b.apply(this,d)}};b.compose=function(){var a=arguments;return function(){for(var b=arguments,d=a.length-1;d>=0;d--)b=[a[d].apply(this,b)];return b[0]}}; o.call(d,this._wrapped);return l(c.apply(b,d),this._chain)}});b.each(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var c=Array.prototype[a];i.prototype[a]=function(){c.apply(this._wrapped,arguments);return l(this._wrapped,this._chain)}});b.each(["concat","join","slice"],function(a){var c=Array.prototype[a];i.prototype[a]=function(){return l(c.apply(this._wrapped,arguments),this._chain)}});i.prototype.chain=function(){this._chain=true;return this};i.prototype.value=function(){return this._wrapped}})();
b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments,
1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};
b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};
b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e<a;e++)b.call(d,e)};b.escape=function(a){return(""+a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")};b.mixin=function(a){j(b.functions(a),
function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+
u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]=
function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain=
true;return this};m.prototype.value=function(){return this._wrapped}}).call(this);

View File

@ -4,7 +4,7 @@
* *
* sphinx.websupport utilties for all documentation. * sphinx.websupport utilties for all documentation.
* *
* :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details. * :license: BSD, see LICENSE for details.
* *
*/ */

View File

@ -1,3 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@ -47,36 +49,36 @@
<div class="section" id="exploitation"> <div class="section" id="exploitation">
<h1>Exploitation<a class="headerlink" href="#exploitation" title="Permalink to this headline"></a></h1> <h1>Exploitation<a class="headerlink" href="#exploitation" title="Permalink to this headline"></a></h1>
<div class="section" id="presentation-de-centreon-esxd"> <div class="section" id="centreon-esxd-presentation">
<h2>Présentation de Centreon-esxd<a class="headerlink" href="#presentation-de-centreon-esxd" title="Permalink to this headline"></a></h2> <h2>Centreon-esxd Presentation<a class="headerlink" href="#centreon-esxd-presentation" title="Permalink to this headline"></a></h2>
<div class="section" id="principes-generaux"> <div class="section" id="generals-principles">
<h3>Principes Généraux<a class="headerlink" href="#principes-generaux" title="Permalink to this headline"></a></h3> <h3>Generals Principles<a class="headerlink" href="#generals-principles" title="Permalink to this headline"></a></h3>
<p>Centreon-esxd est un programme Perl chargé de récupérer des indicateurs VMWare. Ce programme utilise le SDK Perl fourni par VMWare afin de se connecter et récupérer les informations d&#8217;un (ou plusieurs) VirtualCenter. Pour cela il effectue une connexion TCP avec le(s) VirtualCenter.</p> <p>Centreon-esxd is a Perl program in charged to get back VMWare indicators. This program uses the SDK Perl provided by VMWare in order to connect and get back the informations of one (or more) Virtual Center. To do this, it makes a TCP connection with the VirtualCenter.</p>
<p>Par défaut, «&nbsp;centreon-esxd&nbsp;» lance au moins deux processus (nommé respectivement «&nbsp;handle-client&nbsp;», «&nbsp;handle-vsphere-xxxx&nbsp;»)&nbsp;:</p> <p>By default &#8220;centreon-esxd&#8221; starts at least two processes (named &#8220;handle-client&#8221; and &#8220;handle-vsphere-xxxx&#8221;) :</p>
<dl class="docutils"> <dl class="docutils">
<dt><em>«&nbsp;handle-client&nbsp;»</em>:</dt> <dt><em>«&nbsp;handle-client&nbsp;»</em>:</dt>
<dd><em>Processus en attente des demandes des clients «&nbsp;centreon_esx_client.pl&nbsp;».</em></dd> <dd><em>Process waiting for requests of &#8220;centron-esx-client.pl&#8221; clients.</em></dd>
</dl> </dl>
<p>Voici le fonctionnement&nbsp;:</p> <p>Steps of operation :</p>
<ul class="simple"> <ul class="simple">
<li>Un client se connecte.</li> <li>A client connects.</li>
<li>Le client demande un indicateur de supervision sur un VirtualCenter.</li> <li>The client ask an monitoring indicator on a VirtualCenter.</li>
<li>Le processus «&nbsp;handle-client&nbsp;» fourni cette demande au processus «&nbsp;handle-vsphere-xxxx&nbsp;».</li> <li>The process &#8220;handle-client&#8221; sends the request to process &#8220;handle-vsphere-xxxx&#8221;.</li>
<li>Une réponse est fournie par «&nbsp;handle-vsphere-xxxx&nbsp;» à «&nbsp;handle-client&nbsp;».</li> <li>A response is sent by &#8220;handle-vsphere-xxxx&#8221; to &#8220;handle-client&#8221;.</li>
<li>Le processus «&nbsp;handle-client&nbsp;» fourni la réponse au client.</li> <li>The process &#8220;handle-client&#8221; sends the response to the client.</li>
</ul> </ul>
<dl class="docutils"> <dl class="docutils">
<dt><em>«&nbsp;handle-vsphere-xxxx&nbsp;»</em>:</dt> <dt><em>«&nbsp;handle-vsphere-xxxx&nbsp;»</em>:</dt>
<dd><em>Processus ayant le rôle de se connecter et garder ouverte une session avec son VirtualCenter (De plus, dans un souci de performances, un cache de description des données de performances est créé).</em></dd> <dd><em>Process responsible to connect and to keep opened a session with the VirtualCenter. To ensure quality performance, a cache of datas description is created.</em></dd>
</dl> </dl>
<p>Enfin, ce processus récupère les indicateurs VMWare en créant un sous-processus par demande.</p> <p>Then, this process gets back the VMWare indicators creating a subprocess per request.</p>
<p>Centreon-esxd nécessite impérativement l&#8217;utilisation d&#8217;un (ou plusieurs) VirtualCenter. Il n&#8217;est pas possible de récupérer les informations d&#8217;un serveur ESX directement.</p> <p>Centreon-esxd necessitates the utilization of one (or more) VirtualCenter. It isn&#8217;t possible to get back informations of an ESX server directly.</p>
<p>Voici un exemple d&#8217;architecture éclaté&nbsp;:</p> <p>This is a example of a fragmented architecture :</p>
<img alt="../_images/archi.png" src="../_images/archi.png" /> <img alt="../_images/archi.png" src="../_images/archi.png" />
</div> </div>
<div class="section" id="mode-de-fonctionnement"> <div class="section" id="operating-mode">
<h3>Mode de fonctionnement<a class="headerlink" href="#mode-de-fonctionnement" title="Permalink to this headline"></a></h3> <h3>Operating mode<a class="headerlink" href="#operating-mode" title="Permalink to this headline"></a></h3>
<p>Le programme «&nbsp;centreon-esxd&nbsp;» fonctionne uniquement en mode «&nbsp;daemon&nbsp;». (dans le sens où il ne peut fournir les indicateurs sans l&#8217;utilisation d&#8217;un client).</p> <p>The &#8220;centreon-esxd&#8221; program only works in &#8220;daemon&#8221; mode. (dans le sens où il ne peut fournir les indicateurs sans l&#8217;utilisation d&#8217;un client).</p>
<p>Lors de l&#8217;utilisation du plugin <em>centreon_esx_client.pl</em>, on passe des chaînes de caractères qui vont être lier aux différentes librairies dans <em>&#8220;/usr/share/centreon/lib/centreon-esxd&#8221;</em> et qui va être ensuite communiquer au Vcenter qui va au final retourner le résultat au Client. Le client ouvre une liaison TCP avec le serveur pour récolter les informations nécessaires.</p> <p>Lors de l&#8217;utilisation du plugin <em>centreon_esx_client.pl</em>, on passe des chaînes de caractères qui vont être lier aux différentes librairies dans <em>&#8220;/usr/share/centreon/lib/centreon-esxd&#8221;</em> et qui va être ensuite communiquer au Vcenter qui va au final retourner le résultat au Client. Le client ouvre une liaison TCP avec le serveur pour récolter les informations nécessaires.</p>
</div> </div>
<div class="section" id="configuration-du-connecteur"> <div class="section" id="configuration-du-connecteur">
@ -2191,9 +2193,9 @@ snapshot le plus ancien est plus vielle que «&nbsp;temps_courant XXX&nbsp;
<h3><a href="../index.html">Table Of Contents</a></h3> <h3><a href="../index.html">Table Of Contents</a></h3>
<ul> <ul>
<li><a class="reference internal" href="#">Exploitation</a><ul> <li><a class="reference internal" href="#">Exploitation</a><ul>
<li><a class="reference internal" href="#presentation-de-centreon-esxd">Présentation de Centreon-esxd</a><ul> <li><a class="reference internal" href="#centreon-esxd-presentation">Centreon-esxd Presentation</a><ul>
<li><a class="reference internal" href="#principes-generaux">Principes Généraux</a></li> <li><a class="reference internal" href="#generals-principles">Generals Principles</a></li>
<li><a class="reference internal" href="#mode-de-fonctionnement">Mode de fonctionnement</a></li> <li><a class="reference internal" href="#operating-mode">Operating mode</a></li>
<li><a class="reference internal" href="#configuration-du-connecteur">Configuration du connecteur</a></li> <li><a class="reference internal" href="#configuration-du-connecteur">Configuration du connecteur</a></li>
</ul> </ul>
</li> </li>
@ -2370,7 +2372,7 @@ snapshot le plus ancien est plus vielle que «&nbsp;temps_courant XXX&nbsp;
</div> </div>
<div class="footer"> <div class="footer">
&copy; Copyright 2013, Merethis. &copy; Copyright 2013, Merethis.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2b1. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div> </div>
</body> </body>
</html> </html>

View File

@ -1,4 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@ -14,7 +17,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT: './', URL_ROOT: '',
VERSION: '1.0.0', VERSION: '1.0.0',
COLLAPSE_INDEX: false, COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html', FILE_SUFFIX: '.html',
@ -86,7 +89,7 @@
</div> </div>
<div class="footer"> <div class="footer">
&copy; Copyright 2013, Merethis. &copy; Copyright 2013, Merethis.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2b1. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div> </div>
</body> </body>
</html> </html>

View File

@ -1,3 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@ -13,7 +15,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT: './', URL_ROOT: '',
VERSION: '1.0.0', VERSION: '1.0.0',
COLLAPSE_INDEX: false, COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html', FILE_SUFFIX: '.html',
@ -51,13 +53,13 @@
<div class="toctree-wrapper compound"> <div class="toctree-wrapper compound">
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="installation/index.html">Installation</a><ul> <li class="toctree-l1"><a class="reference internal" href="installation/index.html">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="installation/index.html#pre-requis">Pré-Requis</a></li> <li class="toctree-l2"><a class="reference internal" href="installation/index.html#prerequisites">Prerequisites</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation/index.html#installation-de-centreon-esxd-environnement-centos-rhel-5">Installation de centreon-esxd - Environnement centos/rhel 5</a></li> <li class="toctree-l2"><a class="reference internal" href="installation/index.html#centreon-esxd-installation-centos-rhel-5-systems">Centreon-esxd Installation - centos/rhel 5 systems</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation/index.html#installation-de-centreon-esxd-environnement-centos-rhel-6">Installation de centreon-esxd - Environnement centos/rhel 6</a></li> <li class="toctree-l2"><a class="reference internal" href="installation/index.html#centreon-esxd-installation-centos-rhel-6-systems">Centreon-esxd Installation - centos/rhel 6 systems</a></li>
</ul> </ul>
</li> </li>
<li class="toctree-l1"><a class="reference internal" href="exploitation/index.html">Exploitation</a><ul> <li class="toctree-l1"><a class="reference internal" href="exploitation/index.html">Exploitation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="exploitation/index.html#presentation-de-centreon-esxd">Présentation de Centreon-esxd</a></li> <li class="toctree-l2"><a class="reference internal" href="exploitation/index.html#centreon-esxd-presentation">Centreon-esxd Presentation</a></li>
<li class="toctree-l2"><a class="reference internal" href="exploitation/index.html#optimisation-de-la-configuration-dans-centreon">Optimisation de la configuration dans Centreon</a></li> <li class="toctree-l2"><a class="reference internal" href="exploitation/index.html#optimisation-de-la-configuration-dans-centreon">Optimisation de la configuration dans Centreon</a></li>
<li class="toctree-l2"><a class="reference internal" href="exploitation/index.html#liste-des-controles">Liste des contrôles</a></li> <li class="toctree-l2"><a class="reference internal" href="exploitation/index.html#liste-des-controles">Liste des contrôles</a></li>
</ul> </ul>
@ -127,7 +129,7 @@
</div> </div>
<div class="footer"> <div class="footer">
&copy; Copyright 2013, Merethis. &copy; Copyright 2013, Merethis.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2b1. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div> </div>
</body> </body>
</html> </html>

View File

@ -1,3 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@ -51,20 +53,20 @@
<div class="section" id="installation"> <div class="section" id="installation">
<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h1> <h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h1>
<div class="section" id="pre-requis"> <div class="section" id="prerequisites">
<h2>Pré-Requis<a class="headerlink" href="#pre-requis" title="Permalink to this headline"></a></h2> <h2>Prerequisites<a class="headerlink" href="#prerequisites" title="Permalink to this headline"></a></h2>
<div class="section" id="preconisations-logicielles"> <div class="section" id="software-recommandations">
<h3>Préconisations logicielles<a class="headerlink" href="#preconisations-logicielles" title="Permalink to this headline"></a></h3> <h3>Software Recommandations<a class="headerlink" href="#software-recommandations" title="Permalink to this headline"></a></h3>
<p>Le connecteur &#8220;centreon-esxd&#8221; est testé et validé sur des environnements Linux. <p>The &#8220;centreon-esxd&#8221; connector has been tested on linux systems.
L&#8217;installation sur d&#8217;autres environnements n&#8217;est pas exclu mais non présenté dans ce document (Solaris, Windows, ...).</p> Installation on other system is possible but is outside the scope of this document.</p>
<table border="1" class="docutils"> <table border="1" class="docutils">
<colgroup> <colgroup>
<col width="49%" /> <col width="49%" />
<col width="51%" /> <col width="51%" />
</colgroup> </colgroup>
<thead valign="bottom"> <thead valign="bottom">
<tr class="row-odd"><th class="head">Logiciels</th> <tr class="row-odd"><th class="head">Software</th>
<th class="head">Version minimum</th> <th class="head">Minimal Version</th>
</tr> </tr>
</thead> </thead>
<tbody valign="top"> <tbody valign="top">
@ -80,21 +82,21 @@ L&#8217;installation sur d&#8217;autres environnements n&#8217;est pas exclu mai
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="section" id="preconisations-materielles"> <div class="section" id="hardware-recommandations">
<h3>Préconisations matérielles<a class="headerlink" href="#preconisations-materielles" title="Permalink to this headline"></a></h3> <h3>Hardware Recommandations<a class="headerlink" href="#hardware-recommandations" title="Permalink to this headline"></a></h3>
<p>Le matériel nécessaire dépend du nombre de demandes de vérifications. Par défaut, le connecteur n&#8217;effectue aucunes vérifications. Les ressources minimales sont de&nbsp;:</p> <p>Hardware prerequisites will vary depending on the number of monitored hosts. Without configured, no checks are done. Minimal used ressources are :</p>
<ul class="simple"> <ul class="simple">
<li>mémoire vive&nbsp;: 512 Mo minimum&nbsp;(Peut sensiblement augmenter en fonction du nombre de contrôle).</li> <li>RAM : 512 Mo (May slightly increase with the number of checks).</li>
<li>CPU&nbsp;: même pré-requis que pour le serveur de collecte.</li> <li>CPU : same as poller server.</li>
</ul> </ul>
</div> </div>
</div> </div>
<div class="section" id="installation-de-centreon-esxd-environnement-centos-rhel-5"> <div class="section" id="centreon-esxd-installation-centos-rhel-5-systems">
<h2>Installation de centreon-esxd - Environnement centos/rhel 5<a class="headerlink" href="#installation-de-centreon-esxd-environnement-centos-rhel-5" title="Permalink to this headline"></a></h2> <h2>Centreon-esxd Installation - centos/rhel 5 systems<a class="headerlink" href="#centreon-esxd-installation-centos-rhel-5-systems" title="Permalink to this headline"></a></h2>
<div class="section" id="installation-du-sdk-perl-vmware"> <div class="section" id="sdk-perl-vmware-installation">
<h3>Installation du SDK Perl VMWare<a class="headerlink" href="#installation-du-sdk-perl-vmware" title="Permalink to this headline"></a></h3> <h3>SDK Perl VMWare Installation<a class="headerlink" href="#sdk-perl-vmware-installation" title="Permalink to this headline"></a></h3>
<p>Le connecteur «&nbsp;centreon-esxd&nbsp;» utilise le SDK Perl VMWare pour son fonctionnement. Nous allons donc l&#8217;installer. Pour cela nous allons commencer par installer CPAN qui est le nom d&#8217;un module Perl qui rend aisés le téléchargement, l&#8217;installation, la mise à jour et la maintenance des autres modules Perl qui sont archivés sur le CPAN.</p> <p>The &#8220;centreon-esxd&#8221; connector uses SDK Perl VMWare for its operation. So we install it. To do this, we begin by install CPAN, it&#8217;s the name of a Perl module who improves the download, the installation, the upgrade and the maintenance of others Perl modules who are archived on the CPAN.</p>
<p>Installer les pré-requis CPAN:</p> <p>Install CPAN prerequisites</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># yum install gcc make unzip wget expat-devel e2fsprogs-devel openssl-devel</span> <div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># yum install gcc make unzip wget expat-devel e2fsprogs-devel openssl-devel</span>
<span class="n">root</span> <span class="c"># yum install perl-XML-LibXML perl-Crypt-SSLeay</span> <span class="n">root</span> <span class="c"># yum install perl-XML-LibXML perl-Crypt-SSLeay</span>
@ -111,9 +113,9 @@ L&#8217;installation sur d&#8217;autres environnements n&#8217;est pas exclu mai
<span class="n">root</span> <span class="c"># make &amp;&amp; make install</span> <span class="n">root</span> <span class="c"># make &amp;&amp; make install</span>
</pre></div> </pre></div>
</div> </div>
<p>Nous avons notre environnement prêt pour l&#8217;installation du SDK VMWare.</p> <p>All SDK prerequisites are installed.</p>
<p>Télécharger la dernière version, correspondant à votre architecture 32/64 bits, sur le site officiel de VMWare (<a class="reference external" href="http://www.vmware.com/support/developer/viperltoolkit/">SDK VMWare</a>).</p> <p>Download the last version on the VMWare website (<a class="reference external" href="http://www.vmware.com/support/developer/viperltoolkit/">SDK VMWare</a>) (choose the file correponding to your architecture)</p>
<p>Installer le SDK Perl VMWare:</p> <p>Install VMWare Perl SDK:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># tar zxvf VMware-vSphere-Perl-SDK-5.1.0-780721.x86_64.tar.gz</span> <div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># tar zxvf VMware-vSphere-Perl-SDK-5.1.0-780721.x86_64.tar.gz</span>
<span class="n">root</span> <span class="c"># cd vmware-vsphere-cli-distrib</span> <span class="n">root</span> <span class="c"># cd vmware-vsphere-cli-distrib</span>
<span class="n">root</span> <span class="c"># perl Makefile.pl</span> <span class="n">root</span> <span class="c"># perl Makefile.pl</span>
@ -121,26 +123,25 @@ L&#8217;installation sur d&#8217;autres environnements n&#8217;est pas exclu mai
</pre></div> </pre></div>
</div> </div>
</div> </div>
<div class="section" id="installation-de-modules-complementaires"> <div class="section" id="addtionnal-modules-installation">
<h3>Installation de modules complémentaires<a class="headerlink" href="#installation-de-modules-complementaires" title="Permalink to this headline"></a></h3> <h3>Addtionnal Modules Installation<a class="headerlink" href="#addtionnal-modules-installation" title="Permalink to this headline"></a></h3>
<p>Certains modules complémentaires Perl peuvent être installés si vous souhaitez utiliser certaines fonctionnalités&nbsp;du centreon_esxd :</p> <p>Some features require additionnal prerequisites.</p>
<p>Pour envoyer les logs au daemon «&nbsp;syslog&nbsp;», il est nécessaire d&#8217;installer le module «&nbsp;Unix::Syslog »:</p> <p>To send data to a syslog daemon, the &#8221; Unix::Syslog&#8221; must be installed</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># cpan install Unix::Syslog</span> <div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># cpan install Unix::Syslog</span>
</pre></div> </pre></div>
</div> </div>
<p>Pour vérifier la date des snapshots d&#8217;une machine virtuelle, il est nécessaire d&#8217;installer le module «&nbsp;DateTime::Format::ISO8601&nbsp;» (&nbsp;<strong>ce module installe beaucoup de modules CPAN et est difficilement installable sans mettre à jour globalement «&nbsp;Perl&nbsp;». Cette mise à jour est très risqué</strong> ):</p> <p>To check a virtual server snapshots date, the &#8220;DateTime::Format::ISO8601&#8221; is required (<strong>be advise that this module has a lot of CPAN dependencies and may need a full Perl update. This update is hazardous</strong>)</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># cpan install DateTime</span> <div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># cpan install DateTime</span>
<span class="n">root</span> <span class="c"># cpan install DateTime::Format::ISO8601</span> <span class="n">root</span> <span class="c"># cpan install DateTime::Format::ISO8601</span>
<span class="n">root</span> <span class="c"># o conf make /usr/bin/make</span> <span class="n">root</span> <span class="c"># o conf make /usr/bin/make</span>
<span class="n">root</span> <span class="c"># o conf commit</span> <span class="n">root</span> <span class="c"># o conf commit</span>
</pre></div> </pre></div>
</div> </div>
<p>Ensuite redémarrer votre système.</p> <p>Reboot your system to complete.</p>
</div> </div>
<div class="section" id="installation-de-centreon-esxd"> <div class="section" id="centreon-esxd-installation">
<h3>Installation de centreon-esxd<a class="headerlink" href="#installation-de-centreon-esxd" title="Permalink to this headline"></a></h3> <h3>centreon-esxd Installation<a class="headerlink" href="#centreon-esxd-installation" title="Permalink to this headline"></a></h3>
<p>Télécharger l&#8217;archive de «&nbsp;centreon-esxd&nbsp;».</p> <p>Download « centreon-esxd » archive, then install</p>
<p>Installer les fichiers:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># tar zxvf centreon-esxd-1.X.tar.gz</span> <div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># tar zxvf centreon-esxd-1.X.tar.gz</span>
<span class="n">root</span> <span class="c"># cd centreon-esxd-1.X</span> <span class="n">root</span> <span class="c"># cd centreon-esxd-1.X</span>
<span class="n">root</span> <span class="c"># cp centreon_esxd /usr/bin/</span> <span class="n">root</span> <span class="c"># cp centreon_esxd /usr/bin/</span>
@ -153,20 +154,19 @@ L&#8217;installation sur d&#8217;autres environnements n&#8217;est pas exclu mai
<span class="n">root</span> <span class="c"># cp lib/* /usr/share/centreon/lib/centreon-esxd/</span> <span class="n">root</span> <span class="c"># cp lib/* /usr/share/centreon/lib/centreon-esxd/</span>
</pre></div> </pre></div>
</div> </div>
<p>Activer le daemon «&nbsp;centreon-esxd&nbsp;» au démarrage:</p> <p>Configure &#8220;centreon-esxd&#8221; daemon to start at boot</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># chkconfig --level 2345 centreon_esxd on</span> <div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># chkconfig --level 2345 centreon_esxd on</span>
</pre></div> </pre></div>
</div> </div>
<p><em>Le plugin «&nbsp;nagios&nbsp;» correspond au fichier «&nbsp;centreon_esx_client.pl&nbsp;».</em></p> <p><em>&#8220;centreon_esx_client.pl&#8221; is the corresponding nagios plugin.</em></p>
</div> </div>
</div> </div>
<div class="section" id="installation-de-centreon-esxd-environnement-centos-rhel-6"> <div class="section" id="centreon-esxd-installation-centos-rhel-6-systems">
<h2>Installation de centreon-esxd - Environnement centos/rhel 6<a class="headerlink" href="#installation-de-centreon-esxd-environnement-centos-rhel-6" title="Permalink to this headline"></a></h2> <h2>Centreon-esxd Installation - centos/rhel 6 systems<a class="headerlink" href="#centreon-esxd-installation-centos-rhel-6-systems" title="Permalink to this headline"></a></h2>
<div class="section" id="id1"> <div class="section" id="id1">
<h3>Installation du sdk Perl VMWare<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h3> <h3>SDK Perl VMWare Installation<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h3>
<p>Le connecteur «&nbsp;centreon-esxd&nbsp;» utilise le SDK Perl VMWare pour son fonctionnement.</p> <p>The &#8220;centreon-esxd&#8221; connector uses SDK Perl VMWare for its operation. So we install it. To do this, we begin by install CPAN, it&#8217;s the name of a Perl module who improves the download, the installation, the upgrade and the maintenance of others Perl modules who are archived on the CPAN.</p>
<p>Le connecteur «&nbsp;centreon-esxd&nbsp;» utilise le SDK Perl VMWare pour son fonctionnement. Nous allons donc l&#8217;installer. Pour cela nous allons commencer par installer CPAN qui est le nom d&#8217;un module Perl qui rend aisés le téléchargement, l&#8217;installation, la mise à jour et la maintenance des autres modules Perl qui sont archivés sur le CPAN.</p> <p>Install CPAN prerequisites</p>
<p>Installer les pré-requis CPAN:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># yum install gcc make unzip wget expat-devel e2fsprogs-devel openssl-devel perl-CPAN libuuid-devel</span> <div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># yum install gcc make unzip wget expat-devel e2fsprogs-devel openssl-devel perl-CPAN libuuid-devel</span>
<span class="n">root</span> <span class="c"># yum install perl-XML-LibXML perl-Crypt-SSLeay perl-Class-MethodMaker perl-SOAP-Lite</span> <span class="n">root</span> <span class="c"># yum install perl-XML-LibXML perl-Crypt-SSLeay perl-Class-MethodMaker perl-SOAP-Lite</span>
@ -182,9 +182,9 @@ L&#8217;installation sur d&#8217;autres environnements n&#8217;est pas exclu mai
<span class="n">root</span> <span class="c"># make &amp;&amp; make install</span> <span class="n">root</span> <span class="c"># make &amp;&amp; make install</span>
</pre></div> </pre></div>
</div> </div>
<p>Nous avons notre environnement prêt pour l&#8217;installation du SDK VMWare.</p> <p>All SDK prerequisites are installed.</p>
<p>Télécharger la dernière version, correspondant à votre architecture 32/64 bits, sur le site officiel de VMWare (<a class="reference external" href="http://www.vmware.com/support/developer/viperltoolkit/">SDK VMWare</a>)</p> <p>Download the last version on the VMWare website (<a class="reference external" href="http://www.vmware.com/support/developer/viperltoolkit/">SDK VMWare</a>) (choose the file correponding to your architecture)</p>
<p>Installer le SDK Perl VMWare:</p> <p>Install VMWare Perl SDK:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># tar zxvf VMware-vSphere-Perl-SDK-5.1.0-780721.x86_64.tar.gz</span> <div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># tar zxvf VMware-vSphere-Perl-SDK-5.1.0-780721.x86_64.tar.gz</span>
<span class="n">root</span> <span class="c"># cd vmware-vsphere-cli-distrib</span> <span class="n">root</span> <span class="c"># cd vmware-vsphere-cli-distrib</span>
<span class="n">root</span> <span class="c"># perl Makefile.pl</span> <span class="n">root</span> <span class="c"># perl Makefile.pl</span>
@ -193,25 +193,24 @@ L&#8217;installation sur d&#8217;autres environnements n&#8217;est pas exclu mai
</div> </div>
</div> </div>
<div class="section" id="id3"> <div class="section" id="id3">
<h3>Installation de modules complémentaires<a class="headerlink" href="#id3" title="Permalink to this headline"></a></h3> <h3>Addtionnal Modules Installation<a class="headerlink" href="#id3" title="Permalink to this headline"></a></h3>
<p>Certains modules complémentaires Perl peuvent être installés si vous souhaitez utiliser certaines fonctionnalités&nbsp;du centreon_esxd :</p> <p>Some features require additionnal prerequisites.</p>
<p>Pour envoyer les logs au daemon «&nbsp;syslog&nbsp;», il est nécessaire d&#8217;installer le module «&nbsp;Unix::Syslog »:</p> <p>To send data to a syslog daemon, the &#8221; Unix::Syslog&#8221; must be installed</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># cpan install Unix::Syslog</span> <div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># cpan install Unix::Syslog</span>
</pre></div> </pre></div>
</div> </div>
<p>Pour vérifier la date des snapshots d&#8217;une machine virtuelle, il est nécessaire d&#8217;installer le module «&nbsp;DateTime::Format::ISO8601&nbsp;» (&nbsp;<strong>ce module installe beaucoup de modules CPAN et est difficilement installable sans mettre à jour globalement «&nbsp;Perl&nbsp;». Cette mise à jour est très risqué</strong> ):</p> <p>To check a virtual server snapshots date, the &#8220;DateTime::Format::ISO8601&#8221; is required (<strong>be advise that this module has a lot of CPAN dependencies and may need a full Perl update. This update is hazardous</strong>)</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># cpan install DateTime</span> <div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># cpan install DateTime</span>
<span class="n">root</span> <span class="c"># cpan install DateTime::Format::ISO8601</span> <span class="n">root</span> <span class="c"># cpan install DateTime::Format::ISO8601</span>
<span class="n">root</span> <span class="c"># o conf make /usr/bin/make</span> <span class="n">root</span> <span class="c"># o conf make /usr/bin/make</span>
<span class="n">root</span> <span class="c"># o conf commit</span> <span class="n">root</span> <span class="c"># o conf commit</span>
</pre></div> </pre></div>
</div> </div>
<p>Ensuite redémarrer votre système.</p> <p>Reboot your system to complete.</p>
</div> </div>
<div class="section" id="id4"> <div class="section" id="id4">
<h3>Installation de centreon-esxd<a class="headerlink" href="#id4" title="Permalink to this headline"></a></h3> <h3>centreon-esxd Installation<a class="headerlink" href="#id4" title="Permalink to this headline"></a></h3>
<p>Télécharger l&#8217;archive de «&nbsp;centreon-esxd&nbsp;».</p> <p>Download « centreon-esxd » archive, then install</p>
<p>Installer les fichiers:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># tar zxvf centreon-esxd-1.X.tar.gz</span> <div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># tar zxvf centreon-esxd-1.X.tar.gz</span>
<span class="n">root</span> <span class="c"># cd centreon-esxd-1.X</span> <span class="n">root</span> <span class="c"># cd centreon-esxd-1.X</span>
<span class="n">root</span> <span class="c"># cp centreon_esxd /usr/bin/</span> <span class="n">root</span> <span class="c"># cp centreon_esxd /usr/bin/</span>
@ -224,11 +223,11 @@ L&#8217;installation sur d&#8217;autres environnements n&#8217;est pas exclu mai
<span class="n">root</span> <span class="c"># cp lib/* /usr/share/centreon/lib/centreon-esxd/</span> <span class="n">root</span> <span class="c"># cp lib/* /usr/share/centreon/lib/centreon-esxd/</span>
</pre></div> </pre></div>
</div> </div>
<p>Activer le daemon «&nbsp;centreon-esxd&nbsp;» au démarrage:</p> <p>Configure &#8220;centreon-esxd&#8221; daemon to start at boot</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># chkconfig --level 2345 centreon_esxd on</span> <div class="highlight-python"><div class="highlight"><pre><span class="n">root</span> <span class="c"># chkconfig --level 2345 centreon_esxd on</span>
</pre></div> </pre></div>
</div> </div>
<p><em>Le plugin «&nbsp;nagios&nbsp;» correspond au fichier «&nbsp;centreon_esx_client.pl&nbsp;».</em></p> <p><em>&#8220;centreon_esx_client.pl&#8221; is the corresponding nagios plugin.</em></p>
</div> </div>
</div> </div>
</div> </div>
@ -242,21 +241,21 @@ L&#8217;installation sur d&#8217;autres environnements n&#8217;est pas exclu mai
<h3><a href="../index.html">Table Of Contents</a></h3> <h3><a href="../index.html">Table Of Contents</a></h3>
<ul> <ul>
<li><a class="reference internal" href="#">Installation</a><ul> <li><a class="reference internal" href="#">Installation</a><ul>
<li><a class="reference internal" href="#pre-requis">Pré-Requis</a><ul> <li><a class="reference internal" href="#prerequisites">Prerequisites</a><ul>
<li><a class="reference internal" href="#preconisations-logicielles">Préconisations logicielles</a></li> <li><a class="reference internal" href="#software-recommandations">Software Recommandations</a></li>
<li><a class="reference internal" href="#preconisations-materielles">Préconisations matérielles</a></li> <li><a class="reference internal" href="#hardware-recommandations">Hardware Recommandations</a></li>
</ul> </ul>
</li> </li>
<li><a class="reference internal" href="#installation-de-centreon-esxd-environnement-centos-rhel-5">Installation de centreon-esxd - Environnement centos/rhel 5</a><ul> <li><a class="reference internal" href="#centreon-esxd-installation-centos-rhel-5-systems">Centreon-esxd Installation - centos/rhel 5 systems</a><ul>
<li><a class="reference internal" href="#installation-du-sdk-perl-vmware">Installation du SDK Perl VMWare</a></li> <li><a class="reference internal" href="#sdk-perl-vmware-installation">SDK Perl VMWare Installation</a></li>
<li><a class="reference internal" href="#installation-de-modules-complementaires">Installation de modules complémentaires</a></li> <li><a class="reference internal" href="#addtionnal-modules-installation">Addtionnal Modules Installation</a></li>
<li><a class="reference internal" href="#installation-de-centreon-esxd">Installation de centreon-esxd</a></li> <li><a class="reference internal" href="#centreon-esxd-installation">centreon-esxd Installation</a></li>
</ul> </ul>
</li> </li>
<li><a class="reference internal" href="#installation-de-centreon-esxd-environnement-centos-rhel-6">Installation de centreon-esxd - Environnement centos/rhel 6</a><ul> <li><a class="reference internal" href="#centreon-esxd-installation-centos-rhel-6-systems">Centreon-esxd Installation - centos/rhel 6 systems</a><ul>
<li><a class="reference internal" href="#id1">Installation du sdk Perl VMWare</a></li> <li><a class="reference internal" href="#id1">SDK Perl VMWare Installation</a></li>
<li><a class="reference internal" href="#id3">Installation de modules complémentaires</a></li> <li><a class="reference internal" href="#id3">Addtionnal Modules Installation</a></li>
<li><a class="reference internal" href="#id4">Installation de centreon-esxd</a></li> <li><a class="reference internal" href="#id4">centreon-esxd Installation</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -308,7 +307,7 @@ L&#8217;installation sur d&#8217;autres environnements n&#8217;est pas exclu mai
</div> </div>
<div class="footer"> <div class="footer">
&copy; Copyright 2013, Merethis. &copy; Copyright 2013, Merethis.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2b1. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div> </div>
</body> </body>
</html> </html>

View File

@ -1,3 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@ -13,7 +15,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT: './', URL_ROOT: '',
VERSION: '1.0.0', VERSION: '1.0.0',
COLLAPSE_INDEX: false, COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html', FILE_SUFFIX: '.html',
@ -29,8 +31,6 @@
jQuery(function() { Search.loadIndex("searchindex.js"); }); jQuery(function() { Search.loadIndex("searchindex.js"); });
</script> </script>
<script type="text/javascript" id="searchindexloader"></script>
</head> </head>
<body> <body>
@ -93,7 +93,7 @@
</div> </div>
<div class="footer"> <div class="footer">
&copy; Copyright 2013, Merethis. &copy; Copyright 2013, Merethis.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2b1. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div> </div>
</body> </body>
</html> </html>

File diff suppressed because one or more lines are too long

View File

@ -5,38 +5,38 @@ Exploitation
Centreon-esxd Presentation Centreon-esxd Presentation
--------------------------- ---------------------------
Principes Généraux Generals Principles
`````````````````` ```````````````````
Centreon-esxd est un programme Perl chargé de récupérer des indicateurs VMWare. Ce programme utilise le SDK Perl fourni par VMWare afin de se connecter et récupérer les informations d'un (ou plusieurs) VirtualCenter. Pour cela il effectue une connexion TCP avec le(s) VirtualCenter. Centreon-esxd is a Perl program in charged to get back VMWare indicators. This program uses the SDK Perl provided by VMWare in order to connect and get back the informations of one (or more) Virtual Center. To do this, it makes a TCP connection with the VirtualCenter.
Par défaut, « centreon-esxd » lance au moins deux processus (nommé respectivement « handle-client », « handle-vsphere-xxxx ») : By default "centreon-esxd" starts at least two processes (named "handle-client" and "handle-vsphere-xxxx") :
 handle-client »*:  handle-client »*:
*Processus en attente des demandes des clients « centreon_esx_client.pl ».* *Process waiting for requests of "centron-esx-client.pl" clients.*
Voici le fonctionnement : Steps of operation :
- Un client se connecte. - A client connects.
- Le client demande un indicateur de supervision sur un VirtualCenter. - The client ask an monitoring indicator on a VirtualCenter.
- Le processus « handle-client » fourni cette demande au processus « handle-vsphere-xxxx ». - The process "handle-client" sends the request to process "handle-vsphere-xxxx".
- Une réponse est fournie par « handle-vsphere-xxxx » à « handle-client ». - A response is sent by "handle-vsphere-xxxx" to "handle-client".
- Le processus « handle-client » fourni la réponse au client. - The process "handle-client" sends the response to the client.
 handle-vsphere-xxxx »*:  handle-vsphere-xxxx »*:
*Processus ayant le rôle de se connecter et garder ouverte une session avec son VirtualCenter (De plus, dans un souci de performances, un cache de description des données de performances est créé).* *Process responsible to connect and to keep opened a session with the VirtualCenter. To ensure quality performance, a cache of datas description is created.*
Enfin, ce processus récupère les indicateurs VMWare en créant un sous-processus par demande. Then, this process gets back the VMWare indicators creating a subprocess per request.
Centreon-esxd nécessite impérativement l'utilisation d'un (ou plusieurs) VirtualCenter. Il n'est pas possible de récupérer les informations d'un serveur ESX directement. Centreon-esxd necessitates the utilization of one (or more) VirtualCenter. It isn't possible to get back informations of an ESX server directly.
Voici un exemple d'architecture éclaté : This is a example of a fragmented architecture :
.. image:: ../images/archi.png .. image:: ../images/archi.png
Mode de fonctionnement Operating mode
`````````````````````` ``````````````
Le programme « centreon-esxd » fonctionne uniquement en mode « daemon ». (dans le sens où il ne peut fournir les indicateurs sans l'utilisation d'un client). The "centreon-esxd" program only works in "daemon" mode. (dans le sens où il ne peut fournir les indicateurs sans l'utilisation d'un client).
Lors de l'utilisation du plugin *centreon_esx_client.pl*, on passe des chaînes de caractères qui vont être lier aux différentes librairies dans *"/usr/share/centreon/lib/centreon-esxd"* et qui va être ensuite communiquer au Vcenter qui va au final retourner le résultat au Client. Le client ouvre une liaison TCP avec le serveur pour récolter les informations nécessaires. Lors de l'utilisation du plugin *centreon_esx_client.pl*, on passe des chaînes de caractères qui vont être lier aux différentes librairies dans *"/usr/share/centreon/lib/centreon-esxd"* et qui va être ensuite communiquer au Vcenter qui va au final retourner le résultat au Client. Le client ouvre une liaison TCP avec le serveur pour récolter les informations nécessaires.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -3,7 +3,7 @@ Installation
============ ============
Prerequisites Prerequisites
========== =============
Software Recommandations Software Recommandations
```````````````````````` ````````````````````````
@ -34,10 +34,10 @@ Centreon-esxd Installation - centos/rhel 5 systems
SDK Perl VMWare Installation SDK Perl VMWare Installation
```````````````````````````` ````````````````````````````
Le connecteur « centreon-esxd » utilise le SDK Perl VMWare pour son fonctionnement. Nous allons donc l'installer. Pour cela nous allons commencer par installer CPAN qui est le nom d'un module Perl qui rend aisés le téléchargement, l'installation, la mise à jour et la maintenance des autres modules Perl qui sont archivés sur le CPAN. The "centreon-esxd" connector uses SDK Perl VMWare for its operation. So we install it. To do this, we begin by install CPAN, it's the name of a Perl module who improves the download, the installation, the upgrade and the maintenance of others Perl modules who are archived on the CPAN.
Installer les pré-requis CPAN:: Install CPAN prerequisites ::
root # yum install gcc make unzip wget expat-devel e2fsprogs-devel openssl-devel root # yum install gcc make unzip wget expat-devel e2fsprogs-devel openssl-devel
root # yum install perl-XML-LibXML perl-Crypt-SSLeay root # yum install perl-XML-LibXML perl-Crypt-SSLeay
@ -112,9 +112,9 @@ Centreon-esxd Installation - centos/rhel 6 systems
SDK Perl VMWare Installation SDK Perl VMWare Installation
````````````````````````````` `````````````````````````````
Le connecteur « centreon-esxd » utilise le SDK Perl VMWare pour son fonctionnement. Nous allons donc l'installer. Pour cela nous allons commencer par installer CPAN qui est le nom d'un module Perl qui rend aisés le téléchargement, l'installation, la mise à jour et la maintenance des autres modules Perl qui sont archivés sur le CPAN. The "centreon-esxd" connector uses SDK Perl VMWare for its operation. So we install it. To do this, we begin by install CPAN, it's the name of a Perl module who improves the download, the installation, the upgrade and the maintenance of others Perl modules who are archived on the CPAN.
Installer les pré-requis CPAN:: Install CPAN prerequisites ::
root # yum install gcc make unzip wget expat-devel e2fsprogs-devel openssl-devel perl-CPAN libuuid-devel root # yum install gcc make unzip wget expat-devel e2fsprogs-devel openssl-devel perl-CPAN libuuid-devel
root # yum install perl-XML-LibXML perl-Crypt-SSLeay perl-Class-MethodMaker perl-SOAP-Lite root # yum install perl-XML-LibXML perl-Crypt-SSLeay perl-Class-MethodMaker perl-SOAP-Lite