Thruk
Installation
Attention Mk Livestatus et par conséquent Thruk n'est plus compatible avec les nouvelles version de Centreon-engine.
Pré requis
apt-get install apache2 apache2-mpm-worker libcairo2 libmysqlclient18 libxcb-render0 libxcb-shm0 libxrender1 mysql-common libapache2-mod-fcgid libaudit0 libgd2-xpm libxaw7 libxkbfile1 libxmu6 libxpm4 x11-xkb-utils xfonts-base xserver-common xvfb
Installation de thruk
dpkg -i thruk_1.80-3_debian7_i386.deb Sélection du paquet thruk précédemment désélectionné. (Lecture de la base de données... 49657 fichiers et répertoires déjà installés.) Dépaquetage de thruk (à partir de thruk_1.80-3_debian7_i386.deb) ... Paramétrage de thruk (1.80-3) ... plugins enabled: business_process conf minemap mobile panorama reports2 shinken_features statusmap Module alias already enabled Module fcgid already enabled Module auth_basic already enabled Enabling module rewrite. To activate the new configuration, you need to run: service apache2 restart [ ok ] Reloading web server config: apache2. Thruk has been configured for http://debian7/thruk/. User and password is 'thrukadmin'...
Installation du broker mk livestatus
cd /usr/local/src wget http://mathias-kettner.de/download/mk-livestatus-1.2.2p3.tar.gz tar -xzf mk-livestatus-1.2.2p3.tar.gz cd mk-livestatus-1.2.2p3 ./configure make cp src/livestatus.o /usr/local/centreon-engine/bin
Configuration du poller
usermod -aG centreon-engine www-data service apache2 restart
Installation
Attention Mk Livestatus and therefore Thruk is no longer compatible with the new versions of Centreon-engine.
Prerequisites
apt-get install apache2 apache2-mpm-worker libcairo2 libmysqlclient18 libxcb-render0 libxcb-shm0 libxrender1 mysql-common libapache2-mod-fcgid libaudit0 libgd2-xpm libxaw7 libxkbfile1 libxmu6 libxpm4 x11-xkb-utils xfonts-base xserver-common xvfb
Installing thruk
dpkg -i thruk_1.80-3_debian7_i386.deb Sélection du paquet thruk précédemment désélectionné. (Lecture de la base de données... 49657 fichiers et répertoires déjà installés.) Dépaquetage de thruk (à partir de thruk_1.80-3_debian7_i386.deb) ... Paramétrage de thruk (1.80-3) ... plugins enabled: business_process conf minemap mobile panorama reports2 shinken_features statusmap Module alias already enabled Module fcgid already enabled Module auth_basic already enabled Enabling module rewrite. To activate the new configuration, you need to run: service apache2 restart [ ok ] Reloading web server config: apache2. Thruk has been configured for http://debian7/thruk/. User and password is 'thrukadmin'...
Installing the broker mk livestatus
cd /usr/local/src wget http://mathias-kettner.de/download/mk-livestatus-1.2.2p3.tar.gz tar -xzf mk-livestatus-1.2.2p3.tar.gz cd mk-livestatus-1.2.2p3 ./configure make cp src/livestatus.o /usr/local/centreon-engine/bin
Poller configuration
usermod -aG centreon-engine www-data service apache2 restart
Configuration
Configuration lite sans Centreon
Rajoutez ces deux lignes dans le fichier /usr/local/centreon-engine/etc/centengine.cfg
broker_module=/usr/local/centreon-engine/lib/centreon-engine/externalcmd.so broker_module=/usr/local/centreon-engine/bin/livestatus.o /var/lib/centreon-engine/rw/live
$USER1$=/usr/local/plugins/libexec
service centreon-engine restart
Configuration avec Centreon
Ajouter un nouveau broker et saisir la ligne ci-dessous
/usr/local/centreon-engine/bin/livestatus.o /var/lib/centreon-engine/rw/live
root@poller-broker: tail -f /var/log/centreon-engine/centengine
[1363676307] Event broker module '/usr/local/centreon-engine/lib/centreon-engine/externalcmd.so' deinitialized successfully.
[1363676308] Event broker module '/usr/local/centreon-broker/lib/cbmod.so' deinitialized successfully.
[1363676308] Centreon Engine 1.3.0 starting ... (PID=30072)
[1363676308] Local time is Tue Mar 19 07:58:28 CET 2013
[1363676308] LOG VERSION: 2.0
[1363676308] Event broker module '/usr/local/centreon-engine/lib/centreon-engine/externalcmd.so' initialized successfully.
[1363676308] Centreon Broker: log applier: applying 1 logging objects
[1363676308] Event broker module '/usr/local/centreon-broker/lib/cbmod.so' initialized successfully.
[1363676308] livestatus: Livestatus 1.2.0p4 by Mathias Kettner. Socket: '/var/lib/centreon-engine/rw/live'
[1363676308] livestatus: Please visit us at http://mathias-kettner.de/
[1363676308] livestatus: Hint: please try out OMD - the Open Monitoring Distribution
[1363676308] livestatus: Please visit OMD at http://omdistro.org
[1363676308] livestatus: Cannot open log archive ''
[1363676308] livestatus: Finished initialization. Further log messages go to /var/log/centreon-engine/livestatus.log
[1363676308] Event broker module '/usr/local/centreon-engine/bin/livestatus.o' initialized successfully.
[1363676308] TIMEPERIOD TRANSITION: 24x7;-1;1
[1363676308] TIMEPERIOD TRANSITION: none;-1;0
[1363676308] TIMEPERIOD TRANSITION: nonworkhours;-1;1
[1363676308] TIMEPERIOD TRANSITION: workhours;-1;0
[1363676308] INITIAL HOST STATE: Satellite;UP;HARD;1;OK - 172.16.209.177: rta 0,036ms, lost 0%
[1363676308] INITIAL SERVICE STATE: Satellite;Disk-/;OK;HARD;1;Disk OK - / TOTAL: 0.315GB USED: 0.119GB (37%) FREE: 0.196GB (63%)
[1363676308] INITIAL SERVICE STATE: Satellite;Load;OK;HARD;1;Load average: 0.00, 0.00, 0.00.
[1363676308] INITIAL SERVICE STATE: Satellite;Memory;OK;HARD;1;Total memory used : 13% ram used : 92%, swap used 0%
[1363676308] INITIAL SERVICE STATE: Satellite;Ping;OK;HARD;1;OK - 172.16.209.177: rta 0,018ms, lost 0%
Configuration de Thruk
Première connexion
http://[ip serveur satellite]/thruk
Saisir l'utilisateur admin par défaut thrukadmin mot de passe thrukadmin. Il va de soi qu'il faudra rapidement changer le mot de passe !
Vous obtenez la page de démarrage de Thruk. Pour configurer Thruk avec notre poller, cliquez sur Config Tool.
Il faut configurer le broker du poller sur cette page.
Name : satellite Connection : /var/lib/centreon-engine/rw/live
On peut vérifier la connexion au broker en cliquant sur le bouton test.
Cliquez sur le bouton Save Changes pour appliquer la configuration. Un bandeau vert s'affiche un court instant avant de rendre la main.
Vous obtenez une interface similaire à l'interface web de Nagios avec de nombreuses améliorations.
Changement du mot de passe admin
cd /etc/thruk chmod 660 htpasswd chown www-data:www-data htpassword chmod 660 cgi.cfg chown www-data:www-data cgi.cfg
Dans le champ Username saisissez thrukadmin ou sélectionnez le dans la liste proposée
Vous pouvez changer son mot de passe.
Configuration
Lite configuration without Centreon
Add these two lines in the file /usr/local/centreon-engine/etc/centengine.cfg
broker_module=/usr/local/centreon-engine/lib/centreon-engine/externalcmd.so broker_module=/usr/local/centreon-engine/bin/livestatus.o /var/lib/centreon-engine/rw/live
$USER1$=/usr/local/plugins/libexec
service centreon-engine restart
Centreon Configuration
Add a new broker and enter the following line :
/usr/local/centreon-engine/bin/livestatus.o /var/lib/centreon-engine/rw/live
root@poller-broker: tail -f /var/log/centreon-engine/centengine
[1363676307] Event broker module '/usr/local/centreon-engine/lib/centreon-engine/externalcmd.so' deinitialized successfully.
[1363676308] Event broker module '/usr/local/centreon-broker/lib/cbmod.so' deinitialized successfully.
[1363676308] Centreon Engine 1.3.0 starting ... (PID=30072)
[1363676308] Local time is Tue Mar 19 07:58:28 CET 2013
[1363676308] LOG VERSION: 2.0
[1363676308] Event broker module '/usr/local/centreon-engine/lib/centreon-engine/externalcmd.so' initialized successfully.
[1363676308] Centreon Broker: log applier: applying 1 logging objects
[1363676308] Event broker module '/usr/local/centreon-broker/lib/cbmod.so' initialized successfully.
[1363676308] livestatus: Livestatus 1.2.0p4 by Mathias Kettner. Socket: '/var/lib/centreon-engine/rw/live'
[1363676308] livestatus: Please visit us at http://mathias-kettner.de/
[1363676308] livestatus: Hint: please try out OMD - the Open Monitoring Distribution
[1363676308] livestatus: Please visit OMD at http://omdistro.org
[1363676308] livestatus: Cannot open log archive ''
[1363676308] livestatus: Finished initialization. Further log messages go to /var/log/centreon-engine/livestatus.log
[1363676308] Event broker module '/usr/local/centreon-engine/bin/livestatus.o' initialized successfully.
[1363676308] TIMEPERIOD TRANSITION: 24x7;-1;1
[1363676308] TIMEPERIOD TRANSITION: none;-1;0
[1363676308] TIMEPERIOD TRANSITION: nonworkhours;-1;1
[1363676308] TIMEPERIOD TRANSITION: workhours;-1;0
[1363676308] INITIAL HOST STATE: Satellite;UP;HARD;1;OK - 172.16.209.177: rta 0,036ms, lost 0%
[1363676308] INITIAL SERVICE STATE: Satellite;Disk-/;OK;HARD;1;Disk OK - / TOTAL: 0.315GB USED: 0.119GB (37%) FREE: 0.196GB (63%)
[1363676308] INITIAL SERVICE STATE: Satellite;Load;OK;HARD;1;Load average: 0.00, 0.00, 0.00.
[1363676308] INITIAL SERVICE STATE: Satellite;Memory;OK;HARD;1;Total memory used : 13% ram used : 92%, swap used 0%
[1363676308] INITIAL SERVICE STATE: Satellite;Ping;OK;HARD;1;OK - 172.16.209.177: rta 0,018ms, lost 0%
Thruk Configuration
first connection
http://[ip satellite server]/thruk
Enter the default admin user password thrukadmin thrukadmin. It will quickly change the password!
You get the start page of Thruk. To configure Thruk with our poller, click Config Tool.
You must configure the broker's poller on this page.
Name : satellite Connection : /var/lib/centreon-engine/rw/live
You can check the connection to the broker by pressing the test button.
Click Save Changes to apply the configuration. A green band is shown for a short time before returning.
You get an interface similar to the Nagios web interface with many improvements.
Changing the admin password
cd /etc/thruk chmod 660 htpasswd chown www-data:www-data htpassword chmod 660 cgi.cfg chown www-data:www-data cgi.cfg
In the Username field enter thrukadmin or select it from the list.
You can change the password.