Nagios Plugin for Cacti (NPC) Released

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

divagater wrote: I can't promise any time frame on this. If there are any PHP/MySQL folks that are interested in helping speed this along I would be glad to collaborate.
~Billy
Come on folks, you heard the man, speak up! Wish I were a developer - I'd have this replacing our current THREE monitoring systems tomorrow...and who cares if the company just threw away a half-mill on them. :)
jgisler
Cacti User
Posts: 63
Joined: Wed Sep 28, 2005 1:12 pm

Post by jgisler »

Any status on this?
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

I wish someone could join in on the help with this - it could be at least as good as mactrack and weathermap. Just think, if you could replace the editing of text files for Nagios - feeding config data between nagios and cacti!!! Wow...

:)
julpie
Posts: 15
Joined: Mon Apr 03, 2006 7:43 am
Location: Wuerzburg (Germany)

Post by julpie »

Who knows what ndo2db is? I googled, but I had something interestant in German, I didn't catch everything.
Where can I find information about this?

Thx.
Bye.
slander
Posts: 32
Joined: Thu Mar 16, 2006 12:01 pm

Post by slander »

julpie wrote:Who knows what ndo2db is? I googled, but I had something interestant in German, I didn't catch everything.
Where can I find information about this?

Thx.
Bye.
I think if you polk around some on the nagios sites (nagios.org, nagiosexchange) in the development areas, you can find it.
User avatar
divagater
Cacti User
Posts: 191
Joined: Wed Nov 17, 2004 5:22 pm
Location: Chapel Hill, NC.
Contact:

Post by divagater »

julpie wrote:Who knows what ndo2db is?
ndo2db is a component of ndoutils. ndoutils can be found on the Nagios sourceforge page:

http://sourceforge.net/project/showfile ... p_id=26589

Cheers,
Billy
crocop_83
Posts: 6
Joined: Tue Apr 25, 2006 10:59 am

NPC Nagios can not start

Post by crocop_83 »

Hi,

I would like to install Nagios Plugin For Cacti.
(cacti-0.8.6h + Nagios 2.1 + NPC OS: Fedora Core 4 )
After some difficulties, I achieved to install all the components.
But when I tried to restart Nagios, I 've got this message in my log !

Code: Select all

[1145976826] initializing nagios-db mysql inserter...
[1145976826] nagios-db: inserter locked into db
[1145976826] Event broker module '/usr/local/nagios/modules/inserter.o' initialized successfully.
[1145976826] Finished daemonizing... (New PID=16277)
[1145976869] Caught SIGTERM, shutting down...
Nagios can not start.
NPC use Event Broker and I have configured the file nagios.cfg

Code: Select all


        retain_state_information=0
        event_broker_options=-1 and
        broker_module=/path/to/nagios/modules/inserter.o
Any ideas ?

Thanks,

Crocop_83
slander
Posts: 32
Joined: Thu Mar 16, 2006 12:01 pm

Re: NPC Nagios can not start

Post by slander »

crocop_83 wrote:Hi,

I would like to install Nagios Plugin For Cacti.
(cacti-0.8.6h + Nagios 2.1 + NPC OS: Fedora Core 4 )
After some difficulties, I achieved to install all the components.
But when I tried to restart Nagios, I 've got this message in my log !

Code: Select all

[1145976826] initializing nagios-db mysql inserter...
[1145976826] nagios-db: inserter locked into db
[1145976826] Event broker module '/usr/local/nagios/modules/inserter.o' initialized successfully.
[1145976826] Finished daemonizing... (New PID=16277)
[1145976869] Caught SIGTERM, shutting down...
Nagios can not start.
NPC use Event Broker and I have configured the file nagios.cfg

Code: Select all


        retain_state_information=0
        event_broker_options=-1 and
        broker_module=/path/to/nagios/modules/inserter.o
Any ideas ?

Thanks,

Crocop_83

were there any errors when you compiled inserter.o? It pretty much has to be an inserter compile problem. Also, what platform are you on, and which nagios?
crocop_83
Posts: 6
Joined: Tue Apr 25, 2006 10:59 am

Post by crocop_83 »

When I tried to compile inserter.c, I've got these errors :

Code: Select all

inserter.c: In function `processCheck':
inserter.c:451: parse error before `char'
inserter.c:455: `safeName' undeclared (first use in this function)
inserter.c:455: (Each undeclared identifier is reported only once
inserter.c:455: for each function it appears in.)
inserter.c:470: parse error before `char'
inserter.c:476: `safeServiceDescription' undeclared (first use in this function)
inserter.c: In function `processStatus':
inserter.c:518: parse error before `char'
inserter.c:547: `safeName' undeclared (first use in this function)
inserter.c:556: `safeEventHandler' undeclared (first use in this function)
inserter.c:586: `safeHostCheckCommand' undeclared (first use in this function)
inserter.c:596: `safePerfData' undeclared (first use in this function)
inserter.c:688: `safePluginOutput' undeclared (first use in this function)
inserter.c:714: parse error before `char'
inserter.c:744: `safeServiceDescription' undeclared (first use in this function)
inserter.c:785: `safeServiceCheckCommand' undeclared (first use in this function)
make: *** [all] Erreur 1
So I had to change some variables declaration in the source code. Then I achieved to compile it.
Could it be the source of my problem ?

About the Nagios version, I use the 2.1, and Cacti-0.8.6h.
All the components are installed on Fedora Core 4 Operating system

Crocop_83
julpie
Posts: 15
Joined: Mon Apr 03, 2006 7:43 am
Location: Wuerzburg (Germany)

Post by julpie »

Did you compile inserter.c file in the Nagios source directory ?
crocop_83
Posts: 6
Joined: Tue Apr 25, 2006 10:59 am

Post by crocop_83 »

Yes, I compiled the inserter.c file in the Nagios source directory.
I follow the README.

Code: Select all

 - Nagios Event Broker:
    Edit the MySQL options on line 143 of /cacti/plugins/npc/neb/inserter.c. The parameters
    for connecting to the Cacti database have to be hard coded right now. In the future
    the parameters will be able to be passed in from Nagios.

    Next, copy /cacti/plugins/npc/neb/inserter.c and /cacti/plugins/npc/neb/makefile
    to module/ under your Nagios source directory. cd to the module directory and
    run make. When make completes you should have a file called inserter.o. This is
    the module that will be loaded by Nagios. Copy inserter.o to /path/to/nagios/modules.
I'm using gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113), I think that it can cause my trouble because I had to change some lines of code in inserter.c.

Does it exist a special command to avoid to get these error messages when I try to compile the inserter.c ?
(You could see the error message in my previous post)

Crocop_83
crocop_83
Posts: 6
Joined: Tue Apr 25, 2006 10:59 am

Post by crocop_83 »

Hi,

My gcc version was the problem. I updated gcc, I use gcc version 4.0 now. And everything work fine.

Crocop_83
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

NPC

Post by spoonman »

Anyone remember the fix for this........

netstat:/home/Downloads/nagios-2.2/module# make
gcc -g -O2 -Wall -o inserter.o inserter.c -shared -I../include -I/usr/include/mysql -lmysqlclient -fPIC
inserter.c: In function `nebmodule_init':
inserter.c:143: error: `CLIENT_MULTI_STATEMENTS' undeclared (first use in this function)
inserter.c:143: error: (Each undeclared identifier is reported only once
inserter.c:143: error: for each function it appears in.)
make: *** [all] Error 1


.........it seems you have to hardcode the inserter.c file with your Mysql connect items....what do i change the above too?? its failing??

THX>
julpie
Posts: 15
Joined: Mon Apr 03, 2006 7:43 am
Location: Wuerzburg (Germany)

Re: NPC

Post by julpie »

spoonman wrote:Anyone remember the fix for this........

netstat:/home/Downloads/nagios-2.2/module# make
gcc -g -O2 -Wall -o inserter.o inserter.c -shared -I../include -I/usr/include/mysql -lmysqlclient -fPIC
inserter.c: In function `nebmodule_init':
inserter.c:143: error: `CLIENT_MULTI_STATEMENTS' undeclared (first use in this function)
inserter.c:143: error: (Each undeclared identifier is reported only once
inserter.c:143: error: for each function it appears in.)
make: *** [all] Error 1


.........it seems you have to hardcode the inserter.c file with your Mysql connect items....what do i change the above too?? its failing??

THX>
I had this problem, and I replaced CLIENT_MULTI_STATEMENTS by 0, now it's running.
rordway
Posts: 1
Joined: Thu May 04, 2006 7:27 pm

npc project?

Post by rordway »

divagater wrote: I can't promise any time frame on this. If there are any PHP/MySQL folks that are interested in helping speed this along I would be glad to collaborate.
I would be interested in helping with this. Just drop me a message on how to contact you.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests