Pb NPC, infos not update in cacti

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

Post Reply
jonyhawk
Posts: 3
Joined: Thu Jan 18, 2007 8:22 am

Pb NPC, infos not update in cacti

Post by jonyhawk »

Hi,
I'm frensh so my english isn't very clear but I hope you can understand me.

I will descib all that I do to install npc because perhaps my error is here :)

I take the npc-0.1.1a.tar.gz on the cacti forum.
I do a tar zxvf npc into the /var/www/html/cacti/plugins

Now I have a new folder called npc.

I edit the file /var/www/html/cacti/include/config.php to write the new line :

$plugins = array();
//$plugins[] = 'thold';
$plugins[] = 'thold';
$plugins[] = 'discovery';
$plugins[] = 'ntop';
$plugins[] = 'monitor';
$plugins[] = 'hostinfo';
$plugins[] = 'tools';
$plugins[] = 'weathermap';
$plugins[] = 'haloe';
$plugins[] = 'reports';
$plugins[] = 'rrdclean';
$plugins[] = 'update';
$plugins[] = 'npc'; <-------

Once I do that, I log my self into cacti.

I have le new tab at the top and the new interface appear.
And new tables are create in the cacti data base.

In setting -> npc they ask me to put the root of nagios.cmd
but I haven't any nagios.cmd in /var/log/nagios/rw/
so I do a "scp" from an another nagios installation I did on an other server.
(note : This install I do with a .rpm)

Now I will compile inserter.c

I download nagios2.5

I do a "tar zxvf"

and I copy inserter.c and makefile in the module directory.
I do a "vi" on inserter.c to modify the line 143 with my parameters :

Code: Select all

if (!mysql_real_connect(&mysql,"localhost","USER","PWD","cacti",3306,NULL,CLIENT_MULTI_STATEMENTS)) {
But when I try to compil with a "make" I have some errors with files.h. Some of this files haven't the extension .h but .h.in so I remane those in .h . I don't know if it's the better method but when I do the "make" I have no error and the file inserter.o is create.
(When I execute ./inserter.co in a terminal I have the error :
[root@monitreseau module]# ./inserter.o
Erreur de segmentation
is it normal?)

Next the readme tell me to put this file into the path of nagios module.
/usr/lib/nagios/module/
But I haven't the module directory.
I create this and I put inserter.o into this.
-rwxr-xr-x 1 root root 51654 fév 23 13:28 inserter.o

To finish I put the 3 line in nagios.cfg

retain_state_information=0
event_broker_options=-1 and
broker_module=/usr/lib/nagios/module/inserter.o

I finaly restart nagios and I have this message in the log

[1172235783] Nagios 2.5 starting... (PID=14907)
[1172235783] LOG VERSION: 2.0
[1172235783] initializing nagios-db mysql inserter...
[1172235783] nagios-db: inserter locked into db
[1172235783] Event broker module '/usr/lib/nagios/module/inserter.o' initialized successfully.
[1172235783] Warning: Contact 'testman' is not a member of any contact groups!
[1172235783] Finished daemonizing... (New PID=14928)

But when I go in cacti I haven't any host and service.

Does anyone can help me?

Thx
Mika2006
Cacti User
Posts: 178
Joined: Thu May 03, 2007 2:25 am

Post by Mika2006 »

i have the same probleme
and i don't fin nothing
salut je suis dans le meme cas que toi et j'ai vraiment pas reussi a refaire sortir mes info nagios dans cacti
c vraiment dommage
:(
|Cacti Version - 0.8.6j||Plugin Architecture - 1.1||Poller Type - CMD.php|
|os - Red hat 4es | |Web Server - Apache/2.0.52 (Red Hat)|
|PHP - 4.3.9| |MySQL - 4.1.20| |RRDTool - 1.2.13||SNMP - 5.1.2|
|Plugins| Host Info (hostinfo - v0.1)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests