PDA

View Full Version : Statusmap and Centreon 2.0


paolo
12th August 2008, 17:52
I've just installed Centreon 2.0RC2 on Centos 5.x and all seems to be fine.
I've tried to install the status map module but it looks to be not compatibile with Centreon (i've found some references to oreon config path and names) ... or am i wrong ?

Please be patient for my english :)

DonKiShoot
12th August 2008, 21:24
For what i have heard, all modules will be adapted lately ...

mrcoffee
13th August 2008, 20:58
I hope support will be added soon.

xoroz
8th October 2008, 18:57
hope so too

blindzero
15th January 2009, 16:29
Anything new on this topic?
With the new homepage I cant even download the old ones...?

Matthias

mcazemier
2nd February 2009, 23:13
Any update? Also very interested in the updates modules for Centreon 2.0

AkHeNaToN
3rd February 2009, 00:11
Update for modules will available if Centreon community make it !!!!

Fisrt module with Centreon 2.0 compatibility is "Syslog".

Magios
9th April 2009, 11:07
[FR]
Bonjour à tous,

Sans prétention, j'ai vite fait regardé le chmilblik de statusmap 1.1 et centreon 2, j'ai apporté quelques modif au module pour le rendre au mieux compatible en attendant que "la communauté" le fasse (2 heures de mon temps perso, à peine...)

Tout d'abord, déployez la version 1.1 comme indiqué dans le wiki, en suivant les même actions.

voici la liste des modifications apportées au module :

Fichier "statusmapproxy.php"
Première ligne :

require_once("../../oreon.conf.php");
require_once("../../DBconnect.php");

par

require_once("/etc/centreon/centreon.conf.php");
require_once("../../DBconnect.php");


dernière ligne environ :

$pattern = "|statusmap\.cgi\?host=([A-Za-z0-9-_\.]*)&[^ ]*'|i";
$replacement = "oreon.php?search_type_host=&search_type_host=1&p=2&search=$1'";
$tmp_map = preg_replace($pattern, $replacement,$tmp_map);

par

$pattern = "|statusmap\.cgi\?host=([A-Za-z0-9-_\.]*)&[^ ]*'|i";
$replacement = "main.php?search_type_host=&search_type_host=1&p=2&search=$1'";
$tmp_map = preg_replace($pattern, $replacement,$tmp_map);



Fichier SQL (ou allez directement dans la base de données):

INSERT INTO `topology` (`topology_id`, `topology_name`, `topology_icone`, `topology_parent`, `topology_page`, `topology_order`, `topology_group`, `topology_url`, `topology_url_opt`, `topology_popup`, `topology_modules`, `topology_show`) VALUES ('', 'm_nagios_map', NULL , 2, 204, 40, 1, './modules/statusmap/statusmap.php', NULL , '0', '1', '1');

INSERT INTO `topology` (`topology_id`, `topology_name`, `topology_icone`, `topology_parent`, `topology_page`, `topology_order`, `topology_group`, `topology_url`, `topology_url_opt`, `topology_popup`, `topology_modules`, `topology_show`) VALUES ('', 'm_nagios_statusmap_cgi_opt', './img/icones/16x16/nagios.gif', 50101, 5010120, 120, 1, './modules/statusmap/statusmapOpt.php', '&o=w', '0', '0', '1');

par

INSERT INTO `topology` (`topology_id`, `topology_name`, `topology_icone`, `topology_parent`, `topology_page`, `topology_order`, `topology_group`, `topology_url`, `topology_url_opt`, `topology_popup`, `topology_modules`, `topology_show`) VALUES ('', 'Status Map', NULL , 2, 204, 40, 1, './modules/statusmap/statusmap.php', NULL , '0', '1', '1');

INSERT INTO `topology` (`topology_id`, `topology_name`, `topology_icone`, `topology_parent`, `topology_page`, `topology_order`, `topology_group`, `topology_url`, `topology_url_opt`, `topology_popup`, `topology_modules`, `topology_show`) VALUES ('', 'Status Map', './img/icones/16x16/nagios.gif', 50101, 5010120, 120, 1, './modules/statusmap/statusmapOpt.php', '&o=w', '0', '0', '1');



Attention, il doit peut etre y avoir encore des trucs à modifier, mais de mon côté, c'est satisfaisant.
Je ne fourni aucun support quant aux modif que je vous ai donné.

K0t0x
9th April 2009, 13:18
Merci pour ta contribution, ca fait avancer le projet!!
Perso je ne m'y connais pas assé pour avoir essayer d'adapter le module, donc bravo à toi!

Il faut encourager d'autres personnes à aider le développement des modules.

Magios
9th April 2009, 14:02
je vais essayé de regarder de plus près tout ce qui touche à la page de conf de ce module et la zone de select avec le bouton qui est mal formaté.
Au pire, je complèterai ce post avec le module réadapter et un petit "how to" ^^

Mais de toute façon, je n'ai pas envie de passer trop de temps sur la refonte de module, sinon je le retappe complètement et y appose mon nom.

WAtt
9th April 2009, 23:34
Bah si tu as un peu de temps, je pense que personne n'est contre du moment qu'il est libre (heu ... marche plus les emot ici ? il y avait un :P a la fin de la ligne)

Magios
10th April 2009, 00:29
bon, vu que j'ai aussi attendu, je vais essayé de voir pour l'adapter.

Attention toutefois, actuellement, la solution, ci-dessus, est vraiment donné à "l'arrache", ce module n'est pas parfaitement intégré à centreon 2.0, certaines variables de centreon 2.0 n'étant pas récupéré par le module, ceux-ci ont été directement réécris dans la base de données.

--> je vais faire de mon mieux, mais je pense que si un autre admin connait un developpeur qui peut consacrer (bénévolement) 0,5 jours à débugguer ceci, il le fera mieux que moi et plus rapidement.

Chacun sont domaine de prédilection, même si je suis très polivalent (comme tout admin qui se respecte) ^^ (grave mes chevilles ;-) )

K0t0x
10th April 2009, 15:20
Ok Magios, bon courage, bien sûr le but est d'être toujours dans du Libre :)
En tout cas ça fera avancé!!

Sylvester
18th April 2009, 10:05
Hello,

I woke up early this morning and I dropped by... then I came across this thread, it looks like many of you are waiting for this module to be compatible with Centreon 2.x... no kidding duh?

Well, good news, it's done and it's here.

Just to remind those who don't know yet, there is a module API here :
http://trac.centreon.com/wiki/DocsModuleApiFr
It has yet to be translated into English though ^^

But basically, the main things to change when it comes to updating your modules are the $lang variables that are no longer used and also the proper css classes.

Anyway, I hope you will provide us with some feedbacks, I'll ask Julio to add it on the SVN (or is it already done?) if you guys show some enthusiasm :p

PS : Credits to Magios

Magios
18th April 2009, 15:49
I had not yet been able to analyze all of this but you're right on this subject

thank a lot for your help

(navré pour mon niveau d'anglais plutôt médiocre)

K0t0x
20th April 2009, 18:36
Good Work man, I am going to test this module soon.

(Now it would be necessary to adapt phpweathermap module, because I think that these are most used both modules?)

K0t0x
21st April 2009, 20:16
I tested module, it works correctly, I just found an error in the menu of options of StatusMap, the name of field is not right for the user?

http://img148.imageshack.us/img148/2952/centstatusmap.jpg


Thanks to Sylvester

Edit: Edit the file " formStatusmap.php " line 66: $form->addElement('text', 'nagios_statusmap_user', _("Nagios user for Nagios Status Map CGI"), $attrsText2);
And all it's good!

Sylvester
22nd April 2009, 10:35
Fixed!

Thanks ^^

sifly
22nd April 2009, 14:52
Thanks Sylvester, this module works good !!!

gueutzilla
30th April 2009, 16:09
Hello and thank you for this module.

I have install it but when I go to Monitoring > Status Map, I have the following error :

Fatal error: Call to undefined function HadUserLca() in /usr/local/centreon/www/modules/statusmap/DB-Func.php on line 60


Any idee???

Thanks for your help:rolleyes:

AkHeNaToN
30th April 2009, 17:14
What is your Centreon version ?

New module remade by Sylvester is available for Centreon 2.x

gueutzilla
4th May 2009, 11:47
Thanks for your your repply.

My version of centreon is 2.0 and yes I have download this version (1.2) remade and fixed by Sylverster.

Dounia
7th May 2009, 15:28
thank you the module work good :)

K0t0x
12th May 2009, 18:53
Juste un petit truc: quand on passe la souris au dessus d'un icône, une fenêtre de login apparait (le login pour l'interface nagios).
Est-ce possible de corriger cela? Est ce que c'est un problème de session? Il tente de télécharger quelques chose sur l'interface nagios, mais comme il y a un login, ..?

AkHeNaToN
12th May 2009, 20:42
Oui le plugin va exécuter le CGI statumap.cgi de nagios et donc il requière le même password que celui de la connexion à l'interface de nagios.

Je pense que apache/php à du mal à garder la session.

Jogarem
13th May 2009, 15:08
Hello and thank you for this module.

I have install it but when I go to Monitoring > Status Map, I have the following error :

Fatal error: Call to undefined function HadUserLca() in /usr/local/centreon/www/modules/statusmap/DB-Func.php on line 60


I have the same problem here.. fresh installed Module, Centreon v2.0.1, Ubuntu 8.04 LTS Server.

It doesn't matter when I change settings in module configuration.

Any idea?


(by the way: the module "syslog-ng" and your module use the same topology id 204!! I have fixed it here in my installation so I can install both of them)

.

gueutzilla
18th May 2009, 18:33
A new fresh install of nagios and centreon 2.0.1 and upgrade to 2.0.2 resolve the issue for me.

Now all work properly ;o)

Dam17
19th May 2009, 11:17
Le module fonctionne bien, prenez garde à prendre la dernière version posté par Sylvester.
Avec les erreurs php activées, j'ai juste une petite erreur avec la variable "$map_str" à la ligne 132 du fichier "statusmapproxy.php".

Une petite condition et le problème est réglé. Remplacez la ligne suivante:
$map_str = $map_str . $tmp_map ;

Par le paragraphe suivant:
if(!isset($map_str)) {
$map_str = $tmp_map ;
} else {
$map_str = $map_str . $tmp_map ;
}

killerpapy
22nd May 2009, 11:26
Salut!
Beau travail pour cette "mise à jour" ça marche très bien et ça s'affiche très bien !
Mais bien sur j'ai un petit soucis! Alors j'ai 2 serveurs Nagios un de production et un pour les tests avec les accès via https pour les 2.
J'ai d'abord installer StatusMap sur le serveur de test et ça marche très bien j'installe donc sur celui de production et là COUIC!
Rien de grave mais comme poster précédemment dès que je survole une icône j'ai la fenêtre d'authentification Nagios qui s'ouvre alors que je n'ai pas ce problème avec le serveur de test!

EDIT: Alors je sais d'où ça viens: Lors du survole dune icone le pop-up demande lui aussi les image et là ça active le pop-up d'authentification (je n'ai pas mis ces icones sur le serveur de test voilà pourqoui ya pas d'erreurs ;-) ) . Mais je sais pas comment régler le problème! j'ai suivi ce poste mais ça régle pas l'histoire: http://forum.centreon.com/showthread.php?t=4433&page=2

Quelqu'un a trouvé une solution à ce problème ?
Merci.
Cordialement.

ericf
4th June 2009, 16:39
Super modif pour le probleme : $map_str = $map_str . $tmp_map ;

Merci Dam17

ericf
4th June 2009, 16:40
Super modif pour le probleme : $map_str = $map_str . $tmp_map ;

tmori
8th June 2009, 18:32
j'ai installé nagios status map 1.2 sur mon centreon 2.0.2, tout a bien été configuré comme il faut, mais lorsque je vais sur "Monitoring" puis "Status Map" je n'ai rien qui s'affiche.

Je ne voie pas d'ou vient l'erreur .... :(

tmori
15th June 2009, 21:45
up quelqu'un serait d'ou cela peut'il venir?

simool
22nd June 2009, 14:19
Salut à tous

j'ai eu le même problème que vous tous et en fait il me manquait une option non activé dans les pages de configuration de centreon. il faut modifier dans le cgi.conf l'utilisation de l'authentification : le mettre à oui ensuite tout roule

@plus

zach
7th August 2009, 17:21
Hello,
Module 1.2 fully working on my centreon install
Good job !!

Jogarem
7th August 2009, 17:42
For me, too (on a fresh installed system).

One big problem is still there: When you have a Core/Satellite setup
only those hosts are displayed which are located at the Core system!
This is because all configuration of the satellite is not saved at
the core system but on the satellites only (ok this is not completely right but
the generated files in the centreon dir could be possibly corrupt and so you need the real ones - or better MySQL).

I think it would be a really really great idea to change your extension to get all needed
information out of the MySQL db. This has two reasons:

1) you will solve the Core/Satellite problem
2) you have everything in MySQL you need

.. just my 5 cents..

Regards
Jogarem

michaelwjoyner
7th August 2009, 19:24
Jogarem,

Do you know of any good links/docs for deploying Centreon satellites. I am trying to figure out the mechanics to start deploying it.

Jogarem
7th August 2009, 19:27
Jogarem,

Do you know of any good links/docs for deploying Centreon satellites. I am trying to figure out the mechanics to start deploying it.

Hi Michael,

hm do you know the wiki sites?
http://en.doc.centreon.com/DistributedArchitecture
seems to be what you need?!

Regards

michaelwjoyner
7th August 2009, 21:24
Joga, you 'da man!

........thanks

Pinault22
17th August 2009, 17:18
Bonjour, j'ai nagios 3.0.6 et Centreon2RC6 sur une architecture distribuée...
Je n'arrive pas à implémenter la version 1-2 de statusmap !
j'ai suivi le wiki http://en.doc.centreon.com/Modules:Nagios_StatusMap

je voudrai que le module s'ajoute, mais j'ai un message au dessus de la fenetre du module :
"; $module_conf['statusmap']["lang_files"] = "1"; $module_conf['statusmap']["sql_files"] = "1"; $module_conf['statusmap']["php_files"] = "0"; ?>

ca correspond au fichier de configuration de statusmap !! je n'y comprend rien, help please !

Angelus666
30th September 2009, 14:53
Bonjour,
J'ai un petit soucis avec le Status Map 1.2. Je suis sous centreon 2.0.2.
Lorsque je suis en admin, pas de soucis, je vois bien le status map dans monitoring et je vois ma cartographie.
Mais lorsque je me logue avec un autre compte qui a des ACL, j'ai sa comme erreur :
Fatal error: Call to undefined function HadUserLca() in /usr/local/centreon/www/modules/statusmap/DB-Func.php on line 60


Comment faire pour régler ce problème?
Merci d'avance

crovax
16th October 2009, 10:16
j'ai installé nagios status map 1.2 sur mon centreon 2.0.2, tout a bien été configuré comme il faut, mais lorsque je vais sur "Monitoring" puis "Status Map" je n'ai rien qui s'affiche.

Je ne voie pas d'ou vient l'erreur .... :(

Bonjour,
J'ai le même problème sur un centreon 2.1.1 quelqu'un aurait'il une solution?

fedmahn
19th October 2009, 13:18
Bonjour,

j'ai moi aussi ce problème avec Centreon 2.1.1. Rien ne s'affiche dans l'onglet statusmap alors qu'elle est bien dispo dans la page nagios.

J'ai beaucoup cherché mais je tourne en rond ^^

thefrancky
21st October 2009, 18:24
Bonjour à tous.

Meme pb. Rien ne s'affiche. Pas de message d'erreur avec un Centreon 2.1.2.
Quels logs analyser ?

Merci

jlebec
10th November 2009, 17:37
Bonjour,

Après quelques petites investigations il semblerait que la ligne $hgs = getHostGroups(); dans le fichier statusmap.php soit a l'origine du problème d'affichage. c'est tout ce que j'ai pour le moment.

Hi,

After some investiguations it seems that line $hgs = getHostGroups(); in statusmap.php file is at the origin of this display issue. That is all that I have for the moment.

jlebec
12th November 2009, 12:37
Hi all,

After further investiguation I notice that function getHostGroups is blocking on both file statusmap.php and statusmapproxy.php.
Their is also on statusmapproxy.php file the require_once("../../include/common/common-Func-ACL.php"); line that seems to bring trouble on my side.
getting all those three lines in comment allow to get the status map displayed without the drawing layers option but it is enough for me and this is just a beginning.

Bonjour a tous,

après de plus ample investigations, j'ai du mettre en commentaire la ligne $hgs=getHostGroups(); dans les fichiers statusmap.php et statusmapproxy.php et require_once("../../include/common/common-Func-ACL.php"); dans statusmapproxy.php pour que la satus map s'affiche.
Ceci étant il ne faut pas utiliser les ACL et l'option drawing layers ne sont pas disponible mais c'est déjà un début.

gueutzilla
12th November 2009, 17:40
Bonjour et merci pour ton investigation ;)

J'ai essayer et je me retrouve avec ce message d'erreur :

Warning: implode() [function.implode]: Invalid arguments passed in /usr/local/centreon/www/modules/statusmap/statusmapproxy.php on line 95



Une idée???

gueutzilla
12th November 2009, 18:26
Enfait sa marche nikel pour moi:D

J'avais pas commenter tout ce qu'il fallait ;o)

Donc tout bon merci pour cette astuce ;o)

bfaber
19th November 2009, 12:54
Takk til alle som skriver på fransk for alle de som ikke leser fransk får dermed ikke ta del i deres diskusjon.

ramses.sevilla
24th November 2009, 21:39
Bonsoir,

J'ai le même problème que "Pinault22" avec Centreon 2.1.3 et Nagios 3.2.

Toute solution?

Pourrait-il être PHP 5.3?

Merci et pardon mon français ...

fireeagle
12th December 2009, 16:35
Hi, i has installed Centreon 2.1.3 and nagios 3.0.6, i like use the statusmap module but i see this error :


Warning: require_once(../../DBconnect.php) [function.require-once (http://10.0.1.201/centreon/function.require-once)]: failed to open stream: No such file or directory in /usr/local/centreon/www/modules/statusmap/statusmapproxy.php on line 23

The file DBconnect.php not exist. Any idea?

ramses.sevilla
14th December 2009, 19:08
Try to get this file and copy from previous Centreon versions.


Regards,

Ramses

piedone
16th December 2009, 22:32
If somebody has a working version of StatusMap for Centreon 2.1.3, please upload it. For it doesn't work.
It is missing a lot of files...

THX.

ramses.sevilla
17th December 2009, 08:41
Here you are...


Best regards,

Ramses

heints
19th December 2009, 12:10
Thank You Ramses, that patch works great!

PS! Can anyone help to modify this module to:
1) that it wont share the same page with Syslog module
2) StatusMap 3D from nagios?

tnx!
Hendrik

abys
15th January 2010, 13:02
Je viens d'installer ce module sur mon systeme et quand je click dessus j'arrive sur la page de mon module syslog.

Je pense qu'il doit y avoir un probleme entre les 2.



I've just installed this module on my system and when I go in the module that's opening my syslog module webpage.

I think there is a compatibility issue between the both.


Edit : After installation of nmap module there is another weird behaviour so it's not linked.. I'll try to figure out what's wrong..

AkHeNaToN
15th January 2010, 13:21
Oui car ce module utilise aussi la topologie 204 comme syslog.


UPDATE topology SET topology_page = '209' WHERE topology_page = '204' AND topology_name LIKE 'Status Map';

abys
15th January 2010, 13:29
Ha le vilain, merci bien! ;)

abys
15th January 2010, 13:35
#1451 - Cannot delete or update a parent row: a foreign key constraint fails (temp file operation failed)

Y veux pas, meme manuellement. ca peux se forcer?

Edit :

J'ai reussi a me débrouiller ca marche, thx

AkHeNaToN
15th January 2010, 14:03
Désinstall Status Map via Administration -> Modules, modifie le install.sql pour mettre 209 à la place et réinstall

general9000
12th February 2010, 17:27
Hi.

If somebody has a working version of StatusMap for Centreon 2.1.4 and nagios 3.2.0 please upload it ... statusmapproxy.php don't works for me


I did use Ramses files
http://forum.centreon.com/images/attach/zip.gifstatusmap-module-02.zip (http://forum.centreon.com/attachment.php?attachmentid=1048&d=1261032046) (24.7 KB, 82 views)


http://img163.imageshack.us/img163/4243/statusmap.th.jpg (http://img163.imageshack.us/i/statusmap.jpg/)

AkHeNaToN
18th February 2010, 23:51
It's not a problem with statusmapproxy.php.

Do you have install Nagios web interface ?
Do you have statusmap.cgi in Nagios CGI folder ?

gueutzilla
22nd February 2010, 17:58
Status map with nagios 3.2 and centreon 2.1.4 work good for me...

Try with the attachment...

Unzip the statusmap folder to /usr/local/centreon/www/modules and then apply the rights:

chmod -R 775 /usr/local/centreon/www/modules/statusmap/
chown -R www-data:www-data /usr/local/centreon/www/modules/statusmap/

waner44
25th February 2010, 12:57
Merci gueutzilla ça marche avec ton fichier.

J'ai eu la même erreur avec statusmapproxy.php.

Pour résoudre le problème, il faut aller dans Administration->Option->Option->Status Map
et mettre dans le champs "URI for Nagios Status Map CGI" à la place de http://localhost/nagios/cgi-bin/statusmap.cgi

http://ip_du_serveur/nagios/cgi-bin/statusmap.cgi
ou
http://127.0.0.1 (http://ip/)/nagios/cgi-bin/statusmap.cgi

Ne pas oublier de mettre le user nagios et le mot de passe:
user: nagiosadmin
password:********

waner44
25th February 2010, 14:54
Par contre est ce que quelqu'un à ce problème et sait comment le résoudre:

A chaque fois que je passe ma souris sur les hôtes de la status map pour afficher les infos dans centeron, il me redemande l'identifiant/mot de passe de nagios.

waner44
26th February 2010, 15:42
Alors personne n'a de solution?

superene13
2nd March 2010, 17:30
Bonjour à tous,

un grand merçi à tous les participant de ce post car gràce à vous ma statusmap s'affiche enfin dans Centreon.
Si je peux aider quelqu'un ....
Je suis en Nagios 3.2 et Centreon 2.1.4

I am very very happy !

fedmahn
18th March 2010, 18:05
Cela fonctionne pour moi aussi, j'ai du effectivement indiquer dans les options http://127.0.0.1 (http://ip/)/nagios/cgi-bin/statusmap.cgi, l'adresse ip du serveur ne donnant rien.

Merci à tous :)