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)) {
(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