Nagios Plugin for Cacti (NPC) 2.0.4

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
123ralle
Posts: 15
Joined: Wed Dec 20, 2006 7:32 am

Post by 123ralle »

@Palermo

Please post your debug file
/usr/local/nagios/var/ndo2db.debug

regards,
ralf
Palermo
Cacti User
Posts: 87
Joined: Thu Sep 11, 2008 11:48 pm

Post by Palermo »

hi 123ralle
May by this looks a bit strange.. :roll:
but :) this is the file. :-?


The file is emty :oops:

is this good or bad? :-?

around 03:00PM i gave it 777 permissions to see if that was the problem.
Attachments
ndo2db.PNG
ndo2db.PNG (40.89 KiB) Viewed 7971 times
123ralle
Posts: 15
Joined: Wed Dec 20, 2006 7:32 am

Post by 123ralle »

Palermo,

please check with
ps -ef | grep ndo2db
if you have an running daemon, if not please start the ndo2db
daemon via
/usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg

and tell us the output
Palermo
Cacti User
Posts: 87
Joined: Thu Sep 11, 2008 11:48 pm

Post by Palermo »

Hi

Well this is the output of the commando you gave me

Code: Select all

[root@localhost ~]# ps -ef | grep ndo2db 
nagios    5825     1  0 Sep22 ?        00:00:00 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
nagios   13137     1  0 Sep22 ?        00:00:00 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
nagios   13279     1  0 Sep23 ?        00:00:00 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
root     20412 20342  0 19:53 pts/1    00:00:00 grep ndo2db
[root@localhost ~]# 


And this is what i get if i try to start the deamon.

Code: Select all

[root@localhost ~]# /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg 
Could not bind socket: Address already in use
[root@localhost ~]#
thx in advanced for your help...
Palermo
Cacti User
Posts: 87
Joined: Thu Sep 11, 2008 11:48 pm

Post by Palermo »

Could it be that nagios cannot connect to the database be course in the file: ndodb.cfg is have this rule:

Code: Select all

socket_type=tcp
and in the file: ndomod.cgf

Code: Select all

output_type=tcpsocket
And in th database :

Code: Select all

mysql> status
--------------
mysql  Ver 14.12 Distrib 5.0.66a, for redhat-linux-gnu (i686) using readline 5.1

Connection id:          144174
Current database:       cacti
Current user:           root@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.0.66a Source distribution
Protocol version:       10
[b] Connection:             Localhost via UNIX socket [/b]
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    latin1
Conn.  characterset:    latin1
[b] UNIX socket:            /var/lib/mysql/mysql.sock [/b]
Uptime:                 23 hours 3 min 0 sec

Threads: 21  Questions: 1283019  Slow queries: 0  Opens: 6322  Flush tables: 1  Open tables: 64  Queries per second avg: 15.462
--------------

mysql> 
Should the database also need to work on TCP connection.
Could this be the problem? instead of the UNIX socket?
TazMan
Posts: 1
Joined: Thu Sep 25, 2008 4:20 pm

NDO Error in Nagios Log

Post by TazMan »

I have successfully install the NPC Plugin into Cacti; however, I cannot get the HOSTS, SERVICES, ETC. to populate. I have tried different things but I cannot get the broker_module to load. I get the following error message:

[1222374752] Local time is Thu Sep 25 16:32:32 EDT 2008
[1222374752] LOG VERSION: 2.0
[1222374752] Error: Could not safely copy module 'broker_module=/usr/local/nagios/bin/ndomod.o'.
The module will not be loaded: No such file or directory
[1222374752] Finished daemonizing... (New PID=12078)

I have Nagios 3.0.3 installed on a CentOS 5.2 box using PHP 5.2.6 and Apache 2.2.3

Thanks for the help
Palermo
Cacti User
Posts: 87
Joined: Thu Sep 11, 2008 11:48 pm

Post by Palermo »

Well.
I could not find the solution for this problem.
I stared all over from scratch.
After installing cacti and nagios and ndoutils it works.
So the installing went somehow wrong.

The only thing i have troubles with is installing the PHP-JSON packet.

edit: for the php-json problem if found great solution herehttp://forums.crm.saeven.net/showthread.php?t=128
Last edited by Palermo on Tue Sep 30, 2008 10:17 am, edited 1 time in total.
elesouef
Posts: 18
Joined: Fri Mar 17, 2006 2:52 pm

NPC plugin installed but no data displayed

Post by elesouef »

Hi there,

I installed the NPC plugin (last version found http://trac2.assembla.com/npc 2.0.0b).

Nagios3 is also installed with ndoutils (using debian backports for etch).

My cacti database is loaded with the npc_* tables and they also have datas in them.

The problem is that I get nothing (ie : no data displayed) on the dashboard.

Can anyone help me deal with this issue ? Where should I start ?

Thanks.
Palermo
Cacti User
Posts: 87
Joined: Thu Sep 11, 2008 11:48 pm

Re: NPC plugin installed but no data displayed

Post by Palermo »

elesouef wrote:Hi there,

I installed the NPC plugin (last version found http://trac2.assembla.com/npc 2.0.0b).

Nagios3 is also installed with ndoutils (using debian backports for etch).

My cacti database is loaded with the npc_* tables and they also have datas in them.

The problem is that I get nothing (ie : no data displayed) on the dashboard.

Can anyone help me deal with this issue ? Where should I start ?

Thanks.
Hi i'm gona try to help ok.
I'm quite new myself so...:oops: i just got it working now.. :D
i asume that the necessary plugins are install t like php-json and php-pdo.

if you manual enter a switch in de nagios configuration (switch.cfg(/usr/local/nagios/etc/objects)).
do you see the switch or system being monitor t
elesouef
Posts: 18
Joined: Fri Mar 17, 2006 2:52 pm

Re: NPC plugin installed but no data displayed

Post by elesouef »

Palermo wrote: Hi i'm gona try to help ok.
I'm quite new myself so...:oops: i just got it working now.. :D
i asume that the necessary plugins are install t like php-json and php-pdo.
Thanks !

json and pdo are already installed under debian with the following packages :
libapache2-mod-php5 and php5-mysql.
if you manual enter a switch in de nagios configuration (switch.cfg(/usr/local/nagios/etc/objects)).
do you see the switch or system being monitor t
In fact, the tables are loaded with items ready to be displayed :) But I will test it tomorrow.

Thanks for your help.
drewlander
Posts: 10
Joined: Mon Sep 29, 2008 10:28 am

Post by drewlander »

Right now I am doing a proof of concept using npc, nsca and ndoutils. Basically seeing if we can do all we want to do without spending tons of money on another product that does the same thing.
Everything is working great so far except for one thing:
I cannot create any data input methods to graph for any services that are being checked passively. I can create data input methods fine for servcies that are being checked actively. Is there something obvious I missed?

Thank you.
clayton
Posts: 1
Joined: Tue Oct 07, 2008 8:16 pm

Post by clayton »

I just installed NPC with may nagios install and cacti but I am getting this error when trying to ling my graphs to a service or host.

[Tue Oct 07 21:03:09 2008] [error] [client 192.168.0.51] script '/var/www/graph_image.php' not found or unable to stat

The problem is that file is at /var/www/cacti/graph_image.php


Any body have an idea whats wrong?


Corey
nyx
Posts: 12
Joined: Wed Jul 13, 2005 1:23 am

Re: NPC plugin installed but no data displayed

Post by nyx »

elesouef wrote:Hi there,

I installed the NPC plugin (last version found http://trac2.assembla.com/npc 2.0.0b).

Nagios3 is also installed with ndoutils (using debian backports for etch).

My cacti database is loaded with the npc_* tables and they also have datas in them.

The problem is that I get nothing (ie : no data displayed) on the dashboard.

Can anyone help me deal with this issue ? Where should I start ?

Thanks.
you are missing mysql support in PDO.


[xxx@devhost php-5.2.6]# /local/php5/bin/php -m
[PHP Modules]
ctype
date
dom
eAccelerator
filter
hash
iconv
json
libxml
mysql
pcre
PDO
pdo_mysql
pdo_sqlite
posix
Reflection
session
SimpleXML
snmp
sockets
SPL
SQLite
standard
tokenizer
xml
xmlreader
xmlwriter

[Zend Modules]
eAccelerator
drewlander
Posts: 10
Joined: Mon Sep 29, 2008 10:28 am

Post by drewlander »

I do seem to have it installed:

Code: Select all

php5 -m
[PHP Modules]
ctype
date
dom
filter
hash
iconv
json
libxml
mysql
mysqli
pcre
PDO
pdo_mysql
pdo_sqlite
readline
Reflection
session
SimpleXML
snmp
SPL
SQLite
standard
suhosin
tokenizer
xml
xmlreader
xmlwriter
Could I be missing anything else?
Dag
Posts: 4
Joined: Sun Mar 09, 2008 9:00 am
Location: Stockholm, Sweden

Post by Dag »

clayton wrote:I just installed NPC with may nagios install and cacti but I am getting this error when trying to ling my graphs to a service or host.

[Tue Oct 07 21:03:09 2008] [error] [client 192.168.0.51] script '/var/www/graph_image.php' not found or unable to stat

The problem is that file is at /var/www/cacti/graph_image.php


Any body have an idea whats wrong?


Corey
Quite sure you need to edit the $config['url_path'] variable in:
include/global.php
so that it says:
$config['url_path'] = '/cacti/';
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests