diff --git a/connectors/vmware/doc/en/installation/index.rst b/connectors/vmware/doc/en/installation/index.rst index 237e5bc5c..6a96e651e 100644 --- a/connectors/vmware/doc/en/installation/index.rst +++ b/connectors/vmware/doc/en/installation/index.rst @@ -35,6 +35,118 @@ Hardware prerequisites will depend of check numbers. Minimal used resources are * RAM : 512 Mo (May slightly increase with the number of checks). * CPU : same as poller server. +Centreon-vmware Installation - Debian Wheezy +============================================ + +SDK Perl VMWare Installation +```````````````````````````` + +The "centreon-vmware" connector uses SDK Perl VMWare for its operation. So we install it with VMWare recommandation (only tested with version below). + +========================== ===================== ====================== +Dependency Version Repository +========================== ===================== ====================== +libwww-perl 6.04 wheezy +libxml-libxml-perl 2.0001 wheezy +libclass-methodmaker-perl 2.18 wheezy +libcrypt-ssleay-perl 0.58 wheezy +libsoap-lite-perl 0.714 wheezy +libuuid-perl 0.02 wheezy +========================== ===================== ====================== + +Install following dependency: +:: + + # aptitude install make libxml-libxml-perl libwww-perl libclass-methodmaker-perl libcrypt-ssleay-perl libsoap-lite-perl libuuid-perl + +Download the Perl SDK VMWare and install it: +:: + + # tar zxf VMware-vSphere-Perl-SDK-6.0.0-2503617.x86_64.tar.gz && cd vmware-vsphere-cli-distrib + # perl Makefile.PL + # make && make install + +Requirements +````````````` + +Following prerequisites are mandatory for « centreon_vmware »: + +* « perl-centreon-base »: module since Centreon 2.5 +* « centreon-plugins-base »: the client and some dependencies +* « zeromq » and Perl binding + +Following prerequisites are optional for « centreon_vmware »: + +* « libtimedate-perl » + +centreon-vmware Installation with source +```````````````````````````````````````` + +Install the following package: +:: + + # aptitude install libtimedate-perl + +Add the following line in « /etc/apt/sources.list » file: +:: + + deb http://http.debian.net/debian wheezy-backports main + +Install « zeromq » dependency: +:: + + # aptitude install libzmq3-dev gcc + # wget https://cpan.metacpan.org/authors/id/D/DM/DMAKI/ZMQ-LibZMQ3-1.19.tar.gz + # tar zxf ZMQ-LibZMQ3-1.19.tar.gz && cd ZMQ-LibZMQ3-1.19 + # perl Makefile.PL + # make && make install + # wget https://cpan.metacpan.org/authors/id/D/DM/DMAKI/ZMQ-Constants-1.04.tar.gz + # tar zxf ZMQ-Constants-1.04.tar.gz && cd ZMQ-Constants-1.04 + # perl Makefile.PL + # make && make install + +Download « centreon-vmware » archive, then install: +:: + + # tar zxvf centreon-vmware-2.0.0.tar.gz + # cd centreon-vmware-2.0.0 + # cp centreon_vmware.pl /usr/bin/ + + # mkdir -p /etc/centreon + # cp contrib/config/centreon_vmware-conf.pm /etc/centreon/centreon_vmware.pm + # cp contrib/debian/centreon_vmware-init /etc/init.d/centreon_vmware + # cp contrib/debian/centreon_vmware-default /etc/default/centreon_vmware + # chmod 775 /etc/init.d/centreon_vmware /usr/bin/centreon_vmware.pl + + # mkdir -p /usr/share/perl5/centreon/vmware/ /usr/share/perl5/centreon/script/ + # cp centreon/vmware/* /usr/share/perl5/centreon/vmware/ + # cp centreon/script/centreon_vmware.pm /usr/share/perl5/centreon/script/ + +Configure "centreon-vmware" daemon to start at boot: +:: + + # update-rc.d centreon_vmware defaults + +Install « perl-centreon-base » dependency: +:: + + # git clone -b 2.6.x --single-branch https://github.com/centreon/centreon.git centreon + # cd centreon + # cp lib/perl/centreon/script.pm /usr/share/perl5/centreon/ + # cp -R lib/perl/centreon/common /usr/share/perl5/centreon/ + +Install the client and dependency: +:: + + # git clone http://git.centreon.com/centreon-plugins.git + # cd centreon-plugins + # cp -R centreon/plugins /usr/share/perl5/centreon/ + # mkdir -p /usr/lib/nagios/plugins/centreon/plugins/ + # cp centreon/plugins/* /usr/lib/nagios/plugins/centreon/plugins/ + # mkdir -p /usr/lib/nagios/plugins/apps/vmware/ + # cp -R apps/vmware/* /usr/lib/nagios/plugins/apps/vmware/ + # cp centreon_plugins.pl /usr/lib/nagios/plugins/ + Centreon-vmware Installation - centos/rhel 5 systems ==================================================== @@ -55,7 +167,8 @@ perl-UUID 0.04 ces standard perl-VMware-vSphere 5.1.0-780721.1 ces standard ======================= ===================== ====================== -Install following dependency:: +Install following dependency: +:: # yum install perl-VMware-vSphere @@ -88,7 +201,8 @@ Install the client: centreon-vmware Installation with source ```````````````````````````````````````` -Download « centreon-vmware » archive, then install :: +Download « centreon-vmware » archive, then install: +:: # tar zxvf centreon-vmware-2.0.0.tar.gz # cd centreon-vmware-2.0.0 @@ -100,7 +214,7 @@ Download « centreon-vmware » archive, then install :: # cp contrib/redhat/centreon_vmware-sysconfig /etc/sysconfig/centreon_vmware # chmod 775 /etc/init.d/centreon_vmware /usr/bin/centreon_vmware.pl - # mkdir -p /usr/lib/perl5/vendor_perl/5.8.8/centreon/vmware/ + # mkdir -p /usr/lib/perl5/vendor_perl/5.8.8/centreon/vmware/ /usr/lib/perl5/vendor_perl/5.8.8/centreon/script/ # cp centreon/vmware/* /usr/lib/perl5/vendor_perl/5.8.8/centreon/vmware/ # cp centreon/script/centreon_vmware.pm /usr/lib/perl5/vendor_perl/5.8.8/centreon/script/ @@ -117,11 +231,12 @@ Install « perl-centreon-base » dependency: # cp lib/perl/centreon/script.pm /usr/lib/perl5/vendor_perl/5.8.8/centreon/ # cp -R lib/perl/centreon/common /usr/lib/perl5/vendor_perl/5.8.8/centreon/ -Install the client: +Install the client and dependency: :: # git clone http://git.centreon.com/centreon-plugins.git # cd centreon-plugins + # cp -R centreon/plugins /usr/lib/perl5/vendor_perl/5.8.8/centreon/ # mkdir -p /usr/lib/nagios/plugins/centreon/plugins/ # cp centreon/plugins/* /usr/lib/nagios/plugins/centreon/plugins/ # mkdir -p /usr/lib/nagios/plugins/apps/vmware/ @@ -195,7 +310,7 @@ Download « centreon-vmware » archive, then install: # cp contrib/redhat/centreon_vmware-sysconfig /etc/sysconfig/centreon_vmware # chmod 775 /etc/init.d/centreon_vmware /usr/bin/centreon_vmware.pl - # mkdir -p /usr/share/perl5/vendor_perl/centreon/vmware/ + # mkdir -p /usr/share/perl5/vendor_perl/centreon/vmware/ /usr/share/perl5/vendor_perl/centreon/script/ # cp centreon/vmware/* /usr/share/perl5/vendor_perl/centreon/vmware/ # cp centreon/script/centreon_vmware.pm /usr/share/perl5/vendor_perl/centreon/script/ @@ -212,11 +327,12 @@ Install « perl-centreon-base » dependency: # cp lib/perl/centreon/script.pm /usr/share/perl5/vendor_perl/centreon/ # cp -R lib/perl/centreon/common /usr/share/perl5/vendor_perl/centreon/ -Install the client: +Install the client and dependency: :: # git clone http://git.centreon.com/centreon-plugins.git # cd centreon-plugins + # cp -R centreon/plugins /usr/share/perl5/vendor_perl/centreon/ # mkdir -p /usr/lib/nagios/plugins/centreon/plugins/ # cp centreon/plugins/* /usr/lib/nagios/plugins/centreon/plugins/ # mkdir -p /usr/lib/nagios/plugins/apps/vmware/ diff --git a/connectors/vmware/doc/fr/installation/index.rst b/connectors/vmware/doc/fr/installation/index.rst index 38686807b..113559dfb 100644 --- a/connectors/vmware/doc/fr/installation/index.rst +++ b/connectors/vmware/doc/fr/installation/index.rst @@ -35,6 +35,118 @@ Le matériel nécessaire dépend du nombre de demandes de vérifications. Par d * mémoire vive : 512 Mo minimum (Peut sensiblement augmenter en fonction du nombre de contrôle). * CPU : même pré-requis que pour le serveur de collecte. +Centreon-vmware Installation - Debian Wheezy +============================================ + +Installation du SDK Perl VMWare +``````````````````````````````` + +Le connecteur « centreon-vmware » utilise le SDK Perl VMWare pour son fonctionnement. Nous allons donc l'installer en suivant les versions recommandées par VMWare (en dehors de ces versions, le fonctionnement n'est pas garanti). + +========================== ===================== ====================== +Dependency Version Repository +========================== ===================== ====================== +libwww-perl 6.04 wheezy +libxml-libxml-perl 2.0001 wheezy +libclass-methodmaker-perl 2.18 wheezy +libcrypt-ssleay-perl 0.58 wheezy +libsoap-lite-perl 0.714 wheezy +libuuid-perl 0.02 wheezy +========================== ===================== ====================== + +Installer les dépendances suivantes: +:: + + # aptitude install make libxml-libxml-perl libwww-perl libclass-methodmaker-perl libcrypt-ssleay-perl libsoap-lite-perl libuuid-perl + +Télécharger et installer le Perl SDK VMWare: +:: + + # tar zxf VMware-vSphere-Perl-SDK-6.0.0-2503617.x86_64.tar.gz && cd vmware-vsphere-cli-distrib + # perl Makefile.PL + # make && make install + +Pré-requis +`````````` + +Les dépendances suivantes sont nécessaires pour le fonctionnement de « centreon_vmware »: + +* « perl-centreon-base »: module depuis Centreon 2.5 +* « centreon-plugins-base »: le client et des dépendances +* « zeromq » et son module Perl + +Les dépendances suivantes sont optionnelles pour le fonctionnement de « centreon_vmware »: + +* « libtimedate-perl » + +Installation de centreon-vmware par les sources +``````````````````````````````````````````````` + +Installer le paquet suivant: +:: + + # aptitude install libtimedate-perl + +Ajouter la ligne suivante dans le fichier « /etc/apt/sources.list »: +:: + + deb http://http.debian.net/debian wheezy-backports main + +Installer la dépendance « zeromq »: +:: + + # aptitude install libzmq3-dev gcc + # wget https://cpan.metacpan.org/authors/id/D/DM/DMAKI/ZMQ-LibZMQ3-1.19.tar.gz + # tar zxf ZMQ-LibZMQ3-1.19.tar.gz && cd ZMQ-LibZMQ3-1.19 + # perl Makefile.PL + # make && make install + # wget https://cpan.metacpan.org/authors/id/D/DM/DMAKI/ZMQ-Constants-1.04.tar.gz + # tar zxf ZMQ-Constants-1.04.tar.gz && cd ZMQ-Constants-1.04 + # perl Makefile.PL + # make && make install + +Télécharger l'archive de « centreon-vmware » et installer le connecteur: +:: + + # tar zxvf centreon-vmware-2.0.0.tar.gz + # cd centreon-vmware-2.0.0 + # cp centreon_vmware.pl /usr/bin/ + + # mkdir -p /etc/centreon + # cp contrib/config/centreon_vmware-conf.pm /etc/centreon/centreon_vmware.pm + # cp contrib/debian/centreon_vmware-init /etc/init.d/centreon_vmware + # cp contrib/debian/centreon_vmware-default /etc/default/centreon_vmware + # chmod 775 /etc/init.d/centreon_vmware /usr/bin/centreon_vmware.pl + + # mkdir -p /usr/share/perl5/centreon/vmware/ /usr/share/perl5/centreon/script/ + # cp centreon/vmware/* /usr/share/perl5/centreon/vmware/ + # cp centreon/script/centreon_vmware.pm /usr/share/perl5/centreon/script/ + +Activer le daemon « centreon-vmware » au démarrage: +:: + + # update-rc.d centreon_vmware defaults + +Installer la dépendance « perl-centreon-base »: +:: + + # git clone -b 2.6.x --single-branch https://github.com/centreon/centreon.git centreon + # cd centreon + # cp lib/perl/centreon/script.pm /usr/share/perl5/centreon/ + # cp -R lib/perl/centreon/common /usr/share/perl5/centreon/ + +Installer le client et les dépendances: +:: + + # git clone http://git.centreon.com/centreon-plugins.git + # cd centreon-plugins + # cp -R centreon/plugins /usr/share/perl5/centreon/ + # mkdir -p /usr/lib/nagios/plugins/centreon/plugins/ + # cp centreon/plugins/* /usr/lib/nagios/plugins/centreon/plugins/ + # mkdir -p /usr/lib/nagios/plugins/apps/vmware/ + # cp -R apps/vmware/* /usr/lib/nagios/plugins/apps/vmware/ + # cp centreon_plugins.pl /usr/lib/nagios/plugins/ + Installation de centreon-vmware - Environnement centos/rhel 5 ============================================================= @@ -55,7 +167,8 @@ perl-UUID 0.04 ces standard perl-VMware-vSphere 5.1.0-780721.1 ces standard ======================= ===================== ====================== -Installer la dépendance suivante:: +Installer la dépendance suivante: +:: # yum install perl-VMware-vSphere @@ -90,7 +203,8 @@ Installation de centreon-vmware par les sources Télécharger l'archive de « centreon-vmware ». -Installer les fichiers:: +Installer les fichiers: +:: # tar zxvf centreon-vmware-2.0.0.tar.gz # cd centreon-vmware-2.0.0 @@ -102,11 +216,12 @@ Installer les fichiers:: # cp contrib/redhat/centreon_vmware-sysconfig /etc/sysconfig/centreon_vmware # chmod 775 /etc/init.d/centreon_vmware /usr/bin/centreon_vmware.pl - # mkdir -p /usr/lib/perl5/vendor_perl/5.8.8/centreon/vmware/ + # mkdir -p /usr/lib/perl5/vendor_perl/5.8.8/centreon/vmware/ /usr/lib/perl5/vendor_perl/5.8.8/centreon/script/ # cp centreon/vmware/* /usr/lib/perl5/vendor_perl/5.8.8/centreon/vmware/ # cp centreon/script/centreon_vmware.pm /usr/lib/perl5/vendor_perl/5.8.8/centreon/script/ -Activer le daemon « centreon-vmware » au démarrage:: +Activer le daemon « centreon-vmware » au démarrage: +:: # chkconfig --level 2345 centreon_vmware on @@ -118,11 +233,12 @@ Installer la dépendance « perl-centreon-base »: # cp lib/perl/centreon/script.pm /usr/lib/perl5/vendor_perl/5.8.8/centreon/ # cp -R lib/perl/centreon/common /usr/lib/perl5/vendor_perl/5.8.8/centreon/ -Installer le client: +Installer le client et les dépendances: :: # git clone http://git.centreon.com/centreon-plugins.git # cd centreon-plugins + # cp -R centreon/plugins /usr/lib/perl5/vendor_perl/5.8.8/centreon/ # mkdir -p /usr/lib/nagios/plugins/centreon/plugins/ # cp centreon/plugins/* /usr/lib/nagios/plugins/centreon/plugins/ # mkdir -p /usr/lib/nagios/plugins/apps/vmware/ @@ -198,10 +314,15 @@ Installer le connecteur: # cp contrib/redhat/centreon_vmware-sysconfig /etc/sysconfig/centreon_vmware # chmod 775 /etc/init.d/centreon_vmware /usr/bin/centreon_vmware.pl - # mkdir -p /usr/share/perl5/vendor_perl/centreon/vmware/ + # mkdir -p /usr/share/perl5/vendor_perl/centreon/vmware/ /usr/share/perl5/vendor_perl/centreon/script/ # cp centreon/vmware/* /usr/share/perl5/vendor_perl/centreon/vmware/ # cp centreon/script/centreon_vmware.pm /usr/share/perl5/vendor_perl/centreon/script/ +Activer le daemon « centreon-vmware » au démarrage: +:: + + # chkconfig --level 2345 centreon_vmware on + Installer la dépendance « perl-centreon-base »: :: @@ -210,11 +331,12 @@ Installer la dépendance « perl-centreon-base »: # cp lib/perl/centreon/script.pm /usr/share/perl5/vendor_perl/centreon/ # cp -R lib/perl/centreon/common /usr/share/perl5/vendor_perl/centreon/ -Installer le client: +Installer le client et les dépendances: :: # git clone http://git.centreon.com/centreon-plugins.git # cd centreon-plugins + # cp -R centreon/plugins /usr/share/perl5/vendor_perl/centreon/ # mkdir -p /usr/lib/nagios/plugins/centreon/plugins/ # cp centreon/plugins/* /usr/lib/nagios/plugins/centreon/plugins/ # mkdir -p /usr/lib/nagios/plugins/apps/vmware/ diff --git a/connectors/vmware/packaging/debian/centreon_vmware-default b/connectors/vmware/packaging/debian/centreon_vmware-default new file mode 100644 index 000000000..a5aca771a --- /dev/null +++ b/connectors/vmware/packaging/debian/centreon_vmware-default @@ -0,0 +1,9 @@ +# Configuration for /etc/init.d/centreon_vmware + +# If run centcore at startup default: YES +RUN_AT_STARTUP="YES" + +# Centreon user default: root +CENTREON_USER="root" + +OPTIONS="--logfile=/var/log/centreon_vmware.log --severity=error" \ No newline at end of file diff --git a/connectors/vmware/packaging/debian/centreon_vmware-init b/connectors/vmware/packaging/debian/centreon_vmware-init new file mode 100644 index 000000000..7a44d6d80 --- /dev/null +++ b/connectors/vmware/packaging/debian/centreon_vmware-init @@ -0,0 +1,105 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: centreon_vmware.pl +# Required-Start: $local_fs $network +# Required-Stop: $local_fs $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Should-Start: +# Should-Stop: +# Short-Description: Start daemon centreon_vmware.pl at boot +# Description: +### END INIT INFO + +PKGNAME=centreon_vmware +DESC="centreon-vmware" +DAEMON=/usr/bin/centreon_vmware.pl +PIDFILE=/var/run/centreon/centreon_vmware.pid +FOLDER=/var/run/centreon/ +if [ ! -d "$FOLDER" ]; then # Control will enter here if $DIRECTORY doesn't exist. + mkdir $FOLDER +fi + +if [ ! -x "${DAEMON}" ]; then + echo "The program ${DAEMON} does not exists or is not executable" + exit 3 +fi + +# Include the default user configuration if exists +[ -r /etc/default/${PKGNAME} ] && . /etc/default/${PKGNAME} + +# Load the VERBOSE setting and other rcS variables +[ -f /etc/init/vars.sh ] && . /etc/init/vars.sh + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +if [ -z "${RUN_AT_STARTUP}" -o "${RUN_AT_STARTUP}" != "YES" ]; then + log_warning_msg "Not starting $PKGNAME, edit /etc/default/$PKGNAME to start it." + exit 0 +fi + +if [ -z "${CENTREON_USER}" ]; then + log_warning_msg "Not starting $PKGNAME, CENTREON_USER not set in /etc/default/$PKGNAME." + exit 0 +fi + +do_start() +{ + start-stop-daemon --start --background --quiet --pidfile ${PIDFILE} --exec ${DAEMON} \ + --chuid ${CENTREON_USER} --user ${CENTREON_USER} --test -- $OPTIONS + [ "$?" = "0" ] || return 1 + start-stop-daemon --start --background --quiet --pidfile ${PIDFILE} --exec ${DAEMON} \ + --make-pidfile --chuid ${CENTREON_USER} --user ${CENTREON_USER} -- $OPTIONS + [ "$?" = "0" ] || return 2 + return 0 +} + +do_stop() +{ + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --user ${CENTREON_USER} --pidfile ${PIDFILE} + [ "$?" = "2" ] && return 2 + rm -rf ${PIDFILE} + [ "$?" = 0 ] && return 0 || return 1 +} + +case "$1" in + start) + [ "${VERBOSE}" != "no" ] && log_daemon_msg "Starting ${DESC}" "${PKGNAME}" + do_start + case "$?" in + 0|1) [ "${VERBOSE}" != "no" ] && log_end_msg 0 ;; + 2) [ "${VERBOSE}" != "no" ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "${VERBOSE}" != no ] && log_daemon_msg "Stopping ${DESC}" "${PKGNAME}" + do_stop + case "$?" in + 0|1) [ "${VERBOSE}" != no ] && log_end_msg 0 ;; + 2) [ "${VERBOSE}" != no ] && log_end_msg 1 ;; + esac + ;; + status) + status_of_proc ${DAEMON} ${PKGNAME} -p ${PIDFILE} + ;; + restart|force-reload) + [ "${VERBOSE}" != no ] && log_daemon_msg "Restarting ${DESC}" "${PKGNAME}" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; + *) log_end_msg 1 ;; + esac + ;; + *) log_end_msg 1 ;; + esac + ;; + *) + echo "Usage: ${SCRIPTNAME} (start|stop|status|restart|force-reload)" >&2 + exit 3 +esac \ No newline at end of file