
La nouvelle version 2.7 de Centreon implique la mise à jour des widgets Centreon. Si vous utilisez la version CES, l’upgrade avec l’outil de gestion de package yum permettra la mise à jour des widgets. Par contre, si vous utilisez les sources, depuis le 22 décembre 2015, vous pouvez télécharger les principaux widgets depuis le site de téléchargement de Centreon. Sinon vous pouvez utiliser le github des widgets Centreon pour récupérer les dernières releases ou les paquets sources qui ne sont pas encore publiés.
Dans ce premier article, vous comprendrez comment récupérer des widgets directement sur le site de téléchargement ou le github de Centreon et comment les installer. Vous aurez un bref aperçu de quelques nouveaux widgets. Et pour finir, un petit tutoriel pour créer des vues personnalisées.
Dans ce premier article, vous comprendrez comment récupérer des widgets directement sur le site de téléchargement ou le github de Centreon et comment les installer. Vous aurez un bref aperçu de quelques nouveaux widgets. Et pour finir, un petit tutoriel pour créer des vues personnalisées.
1 Installation des Widgets par le site de téléchargement de Centreon
Télécharger les Widgets sur le site de téléchargement de Centreon, onglet Widgets

Les versions à télécharger sont indiquées en rouge. Tout d'abord, téléchargez les binaires et copiez-les dans le dossier /usr/local/src. Vous pouvez les télécharger par la commande wget ci-dessous:
cd /usr/local/src wget https://s3-eu-west-1.amazonaws.com/centreon-download/public/centreon-widgets/centreon-widget-graph-monitoring/centreon-widget-graph-monitoring-1.3.0.tar.gz wget https://s3-eu-west-1.amazonaws.com/centreon-download/public/centreon-widgets/centreon-widget-service-monitoring/centreon-widget-service-monitoring-1.4.0.tar.gz wget https://s3-eu-west-1.amazonaws.com/centreon-download/public/centreon-widgets/centreon-widget-host-monitoring/centreon-widget-host-monitoring-1.4.0.tar.gz wget https://s3-eu-west-1.amazonaws.com/centreon-download/public/centreon-widgets/centreon-widget-servicegroup-monitoring/centreon-widget-servicegroup-monitoring-1.3.0.tar.gz wget https://s3-eu-west-1.amazonaws.com/centreon-download/public/centreon-widgets/centreon-widget-hostgroup-monitoring/centreon-widget-hostgroup-monitoring-1.3.0.tar.gz
tar xzf centreon-widget-graph-monitoring-1.3.0.tar.gz tar xzf centreon-widget-service-monitoring-1.4.0.tar.gz tar xzf centreon-widget-host-monitoring-1.4.0.tar.gz tar xzf centreon-widget-servicegroup-monitoring-1.3.0.tar.gz tar xzf centreon-widget-hostgroup-monitoring-1.3.0.tar.gz
1.1 Installation d’un widget
Déplacez les répertoires dans le dossier réservé aux widgets
mv centreon-widget-graph-monitoring-1.3.0/graph-monitoring /usr/local/centreon/www/widgets/ mv centreon-widget-service-monitoring-1.4.0/service-monitoring/ /usr/local/centreon/www/widgets/ mv centreon-widget-host-monitoring-1.4.0/host-monitoring/ /usr/local/centreon/www/widgets/ mv centreon-widget-servicegroup-monitoring-1.3.0/servicegroup-monitoring/ /usr/local/centreon/www/widgets/ mv centreon-widget-hostgroup-monitoring-1.3.0/hostgroup-monitoring/ /usr/local/centreon/www/widgets/
Authentifiez-vous sur l’interface Web de Centreon. Sélectionnez Administration / Extensions / Widgets. Identifiez le widget Graph Monitoring.

Cliquez sur toutes les icônes Actions pour installer les widgets.

Cliquez sur OK

Les widgets sont installés.
1.2 Mise à jour d’un widget
Copiez les fichiers dans le dossier de l’ancien widget.
cp -r /usr/local/src/centreon-widget-graph-monitoring-1.3.0/graph-monitoring/* /usr/local/centreon/www/widgets/graph-monitoring/ cp -r /usr/local/src/centreon-widget-service-monitoring-1.4.0/service-monitoring/* /usr/local/centreon/www/widgets/service-monitoring/ cp -r /usr/local/src/centreon-widget-host-monitoring-1.4.0/host-monitoring/* /usr/local/centreon/www/widgets/host-monitoring/ cp -r /usr/local/src/centreon-widget-servicegroup-monitoring-1.3.0/servicegroup-monitoring/* /usr/local/centreon/www/widgets/servicegroup-monitoring/ cp -r /usr/local/src/centreon-widget-hostgroup-monitoring-1.3.0/hostgroup-monitoring/* /usr/local/centreon/www/widgets/hostgroup-monitoring/
Authentifiez-vous sur l’interface Web de Centreon. Sélectionnez Administration / Extensions / Widgets. Identifiez le widget Graph Monitoring.

Cliquez sur l’icône Flèche verte dans Actions pour mettre à jour le widget. On passera de la version 1.0.0 à la version 1.3.0.

Cliquez sur OK

Le widget est upgradé en version 1.3.0. Procédez de même pour les autres widgets.
2 Installation des Widgets par le github
Il faudra utiliser les outils git pour récupérer les widgets. Installer le package pour Debian par exemple.
apt-get install git-core
Nous utiliserons comme chemin de base Centreon /usr/share/centreon. Adaptez le chemin en fonction de votre installation. Nous prendrons comme exemple le widget centreon-widget-graph-monitoring.
2.1 Installation d’un widget
Récupérons le widget.
cd /usr/local/src git clone https://github.com/Centreon-Widgets/centreon-widget-graph-monitoring.git
Créez un dossier qui contiendra le widget et copiez les fichiers.
mkdir /usr/share/centreon/www/widgets/graph-monitoring cp -r /usr/local/src/centreon-widget-graph-monitoring/graph-monitoring/* /usr/share/centreon/www/widgets/graph-monitoring/
Authentifiez-vous sur l’interface Web de Centreon. Sélectionnez Administration / Extensions / Widgets. Identifiez le widget Graph Monitoring.

Cliquez sur l’icône Actions pour installer le widget.

Cliquez sur OK

Le widget est installé.
2.2 Mise à jour d’un widget
Récupérons le widget.
cd /usr/local/src git clone https://github.com/Centreon-Widgets/centreon-widget-graph-monitoring.git
Copiez les fichiers dans le dossier de l’ancien widget.
cp -r /usr/local/src/centreon-widget-graph-monitoring/graph-monitoring/* /usr/share/centreon/www/widgets/graph-monitoring/
Authentifiez-vous sur l’interface Web de Centreon. Sélectionnez Administration / Extensions / Widgets. Identifiez le widget Graph Monitoring.

Cliquez sur l’icône Flèche verte dans Actions pour mettre à jour le widget. On passera de la version 1.0.0 à la version 1.3.0.

Cliquez sur OK

Le widget est upgradé en version 1.3.0. Procédez de même pour les autres widgets.
2.3 Quelques nouveaux widgets
Sur le github de centreon, vous trouverez des nouveaux widgets intéressants.

Widget-engine-status
git clone https://github.com/Centreon-Widgets/centreon-widget-engine-status.git

Tactical Overview à gauche pour les service, à droite pour les hosts.
git clone https://github.com/Centreon-Widgets/centreon-widget-graph-monitoring.git

Grid-map
git clone https://github.com/Centreon-Widgets/centreon-widget-grid-map.git

Configuration du Grid-map
3 Configuration des vues personnalisés
Dans l'interface de Centreon, dirigez-vous dans la section Home / Custom Views. Nous allons créer notre première vue. Cliquez sur l’icône en forme de crayon.

Puis cliquez sur Add View

Sélectionnez Create new view. Saisissez le nom de votre vue et sélectionnez 3 colonnes. Cliquez sur Submit.

Maintenant, nous allons ajouter nos widgets. cliquez sur Add widgets

Sélectionnez un widget, saisissez un titre et cliquez sur Submit pour l’insérer.

Il faut aussi sélectionnez le poller que l’on veut suivre.

Et voici le résultat.

Et voici un exemple de Widget composé d’un Widget-engine-status, d’un Tactical Overview et d’un Graph Monitoring.

Un autre exemple avec de nouveau widget comme le Grid-map et le Global Health

L’article se termine ici, bientôt nous verrons comment partager nos vues avec les ACL.