Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Mar 24, 2017 12:44 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 65 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject:
PostPosted: Fri Nov 07, 2008 2:18 am 
Offline
Cacti Pro User
User avatar

Joined: Wed Apr 09, 2003 2:17 am
Posts: 710
Location: Izmir/Turkey
Existing NPC versions can support Nagios 3.x ?
Which NPC version is latest one and where is it?
I think time to create a cacti plugin repository.
Right?

_________________
Quote:
Cacti Version - 0.8.7e
Plugin Architecture - 2.5
Poller Type - CMD.php
Server Info - Linux 2.6.28-11-server
Web Server - Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.5 with Suhosin-Patch
PHP - 5.2.6-3ubuntu4.5
PHP Extensions - zip, xmlwriter, libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, session, SimpleXML, sockets, soap, SPL, shmop, standard, Reflection, posix, mime_magic, mbstring, json, iconv, hash, gettext, ftp, filter, exif, dom, dba, date, ctype, calendar, bz2, bcmath, zlib, pcre, openssl, xmlreader, apache2handler, gd, mysql, mysqli, PDO, pdo_mysql, rrdtool, snmp
MySQL - 5.0.75-0ubuntu10.2
RRDTool - 1.3.1
SNMP - 5.4.1
Plugins
    PHP Network Weathermap (weathermap - v0.97a)
    SuperLinks (superlinks - v0.8)
    Real-time statistics (zond - v0.34c)
    Host Info (hostinfo - v0.2)
    Report Creator (reports - v0.3)
    Global Plugin Settings (settings - v0.5)
    Network Discovery (discovery - v0.9)
    System Title Changer (titlechanger - v0.1)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 07, 2008 7:16 am 
Offline
Cacti User
User avatar

Joined: Wed Nov 17, 2004 5:22 pm
Posts: 191
Location: Chapel Hill, NC.
TFC wrote:
Existing NPC versions can support Nagios 3.x ?


Yes

TFC wrote:
Which NPC version is latest one and where is it?


http://trac2.assembla.com/npc

Cheers,
Billy


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 10, 2008 6:38 am 
Offline
Cacti Pro User
User avatar

Joined: Wed Apr 09, 2003 2:17 am
Posts: 710
Location: Izmir/Turkey
Ok. thanx..
But, I have another question.
I have a nagios 3.x and I still use it.
But I didnt install ndoutil at begining. If I install now, will be any problem existin my nagios structure?

_________________
Quote:
Cacti Version - 0.8.7e
Plugin Architecture - 2.5
Poller Type - CMD.php
Server Info - Linux 2.6.28-11-server
Web Server - Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.5 with Suhosin-Patch
PHP - 5.2.6-3ubuntu4.5
PHP Extensions - zip, xmlwriter, libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, session, SimpleXML, sockets, soap, SPL, shmop, standard, Reflection, posix, mime_magic, mbstring, json, iconv, hash, gettext, ftp, filter, exif, dom, dba, date, ctype, calendar, bz2, bcmath, zlib, pcre, openssl, xmlreader, apache2handler, gd, mysql, mysqli, PDO, pdo_mysql, rrdtool, snmp
MySQL - 5.0.75-0ubuntu10.2
RRDTool - 1.3.1
SNMP - 5.4.1
Plugins
    PHP Network Weathermap (weathermap - v0.97a)
    SuperLinks (superlinks - v0.8)
    Real-time statistics (zond - v0.34c)
    Host Info (hostinfo - v0.2)
    Report Creator (reports - v0.3)
    Global Plugin Settings (settings - v0.5)
    Network Discovery (discovery - v0.9)
    System Title Changer (titlechanger - v0.1)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 10, 2008 8:35 am 
Offline
Cacti User
User avatar

Joined: Wed Nov 17, 2004 5:22 pm
Posts: 191
Location: Chapel Hill, NC.
TFC wrote:
Ok. thanx..
But, I have another question.
I have a nagios 3.x and I still use it.
But I didnt install ndoutil at begining. If I install now, will be any problem existin my nagios structure?


No. ndoutils gets installed as a nagios module. if for some reason it made your nagios stop working then just remove the module although ndoutils is written by nagios author and works well with nagios.

Cheers,
Billy


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 10, 2008 8:46 am 
Offline
Cacti Pro User
User avatar

Joined: Wed Apr 09, 2003 2:17 am
Posts: 710
Location: Izmir/Turkey
I asked bec. I have a nagios and I collect the logs of it for erformance KPI. If there is any risk to destroy them, I forget the NPC.

_________________
Quote:
Cacti Version - 0.8.7e
Plugin Architecture - 2.5
Poller Type - CMD.php
Server Info - Linux 2.6.28-11-server
Web Server - Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.5 with Suhosin-Patch
PHP - 5.2.6-3ubuntu4.5
PHP Extensions - zip, xmlwriter, libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, session, SimpleXML, sockets, soap, SPL, shmop, standard, Reflection, posix, mime_magic, mbstring, json, iconv, hash, gettext, ftp, filter, exif, dom, dba, date, ctype, calendar, bz2, bcmath, zlib, pcre, openssl, xmlreader, apache2handler, gd, mysql, mysqli, PDO, pdo_mysql, rrdtool, snmp
MySQL - 5.0.75-0ubuntu10.2
RRDTool - 1.3.1
SNMP - 5.4.1
Plugins
    PHP Network Weathermap (weathermap - v0.97a)
    SuperLinks (superlinks - v0.8)
    Real-time statistics (zond - v0.34c)
    Host Info (hostinfo - v0.2)
    Report Creator (reports - v0.3)
    Global Plugin Settings (settings - v0.5)
    Network Discovery (discovery - v0.9)
    System Title Changer (titlechanger - v0.1)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 11, 2008 2:31 am 
Offline
Cacti Pro User
User avatar

Joined: Wed Apr 09, 2003 2:17 am
Posts: 710
Location: Izmir/Turkey
Hi,
I install ndo2db and set config files etc. acording to nagios' and your documents But nothing change in npc tab on cacti. I look at the nagios.log
I see that:
Quote:
ndomod: Still unable to connect to data sink. 17736 items lost, 5000 queued items to flush.

and in ndo2db.cfg file, there is a config like that:
Code:
db_servertype=mysql
db_host=localhost

But my cacti runs on another server. Should I change to db_servertype as cacti server IP address instead of localhost?
...
Ok change it . But still same error I get:

Quote:
[1226393109] ndomod: Shutdown complete.
[1226393109] Event broker module '/usr/local/nagios/bin/ndomod-3x.o' deinitialized successfully.
[1226393109] ndomod: NDOMOD 1.4b7 (10-31-2007) Copyright (c) 2005-2007 Ethan Galstad (nagios@nagios.org)
[1226393109] ndomod: Could not open data sink! I'll keep trying, but some output may get lost...
[1226393109] Event broker module '/usr/local/nagios/bin/ndomod-3x.o' initialized successfully.
[1226393125] ndomod: Still unable to connect to data sink. 7261 items lost, 5000 queued items to flush.
[1226393141] ndomod: Still unable to connect to data sink. 7461 items lost, 5000 queued items to flush.


Then , I check ndomod.cfg:

Quote:
# OUTPUT
# This option determines the name and path of the file or UNIX domain
# socket to which output will be sent if the output type option specified
# above is "file" or "unixsocket", respectively. If the output type
# option is "tcpsocket", this option is used to specify the IP address
# of fully qualified domain name of the host that the module should
# connect to for sending output.

#output=/usr/local/nagios/var/ndo.dat
output=127.0.0.1
#output=/usr/local/nagios/var/ndo.sock

SO we use tcpsocket, and my cacti runs on another server; is this IP address must be cacti server IP address?
.....
I select 127.0.0.1 and in nagios.log something changes:

Quote:
[1226395444] ndomod: Successfully reconnected to data sink! 363 items lost, 5000 queued items to flush.
[1226395444] ndomod: Error writing to data sink! Some output may get lost. 4584 queued items to flush.


Note that:
In nagios machine there is no nagios db. Should I create?
What is wrong?

_________________
Quote:
Cacti Version - 0.8.7e
Plugin Architecture - 2.5
Poller Type - CMD.php
Server Info - Linux 2.6.28-11-server
Web Server - Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.5 with Suhosin-Patch
PHP - 5.2.6-3ubuntu4.5
PHP Extensions - zip, xmlwriter, libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, session, SimpleXML, sockets, soap, SPL, shmop, standard, Reflection, posix, mime_magic, mbstring, json, iconv, hash, gettext, ftp, filter, exif, dom, dba, date, ctype, calendar, bz2, bcmath, zlib, pcre, openssl, xmlreader, apache2handler, gd, mysql, mysqli, PDO, pdo_mysql, rrdtool, snmp
MySQL - 5.0.75-0ubuntu10.2
RRDTool - 1.3.1
SNMP - 5.4.1
Plugins
    PHP Network Weathermap (weathermap - v0.97a)
    SuperLinks (superlinks - v0.8)
    Real-time statistics (zond - v0.34c)
    Host Info (hostinfo - v0.2)
    Report Creator (reports - v0.3)
    Global Plugin Settings (settings - v0.5)
    Network Discovery (discovery - v0.9)
    System Title Changer (titlechanger - v0.1)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 11, 2008 8:13 am 
Offline
Cacti User
User avatar

Joined: Wed Nov 17, 2004 5:22 pm
Posts: 191
Location: Chapel Hill, NC.
It is fine that the cacti database is on another host. Just make sure that the IP address and credentials are correct in ndo2db.cfg.

Quote:
[1226393125] ndomod: Still unable to connect to data sink. 7261 items lost, 5000 queued items to flush.


The datasink that ndomod is referring to in the log entry above is not the database but rather the ndo2db daemon. Is ndo2db started?

Here is the data flow:

Nagios -> ndomod (nagios module) -> ndo2db (daemon) -> MySQL

Nagios communicates to ndomod via the event broker api and is configured in nagios.cfg. ndomod should be talking to ndo2db via tcp socket on the localhost port 5668. ndo2db should be listening on localhost port 5668. It does not matter where the cacti database is as long as it is accessible on the network.

Now you need to be sure to start ndo2db. I had problems with it dying so I put it under control of init and I show this in the last couple steps of the quick start guide.

Quote:
[07:08:40 - bgunn@exlap600 - monitor: ~]$ ps -ef | grep ndo2db
nagios 27324 1 0 Aug04 ? 00:00:00 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg


Hope this helps,
Billy


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 11, 2008 8:26 am 
Offline
Cacti Pro User
User avatar

Joined: Wed Apr 09, 2003 2:17 am
Posts: 710
Location: Izmir/Turkey
Quote:
oot@yonyim1:/usr/local/nagios/var# /usr/local/nagios/bin/ndo2db-3x -c /usr/local/nagios/etc/ndo2db.cfg
Could not bind socket: Address already in use

I use ubuntu 8.04.But i am not mater about linux.
And u wrote down in quick start installation:

Quote:
NOTE: I had some problems with the ndo2db process dying (regularly) on Fedora Core 7. To get around that I setup the process to respawn via init. If you have trouble with the daemon dying you can add the following line to /etc/inittab

ndo:345:respawn:/usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
After editing inittab issue the following command:

telinit Q
You may see messages like the following in your syslog when using init to respawn ndo2db:

Apr 19 11:11:55 acid init: Id "ndo" respawning too fast: disabled for 5 minutes

I dont know how to do these steps in ubuntu actually.
:(

_________________
Quote:
Cacti Version - 0.8.7e
Plugin Architecture - 2.5
Poller Type - CMD.php
Server Info - Linux 2.6.28-11-server
Web Server - Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.5 with Suhosin-Patch
PHP - 5.2.6-3ubuntu4.5
PHP Extensions - zip, xmlwriter, libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, session, SimpleXML, sockets, soap, SPL, shmop, standard, Reflection, posix, mime_magic, mbstring, json, iconv, hash, gettext, ftp, filter, exif, dom, dba, date, ctype, calendar, bz2, bcmath, zlib, pcre, openssl, xmlreader, apache2handler, gd, mysql, mysqli, PDO, pdo_mysql, rrdtool, snmp
MySQL - 5.0.75-0ubuntu10.2
RRDTool - 1.3.1
SNMP - 5.4.1
Plugins
    PHP Network Weathermap (weathermap - v0.97a)
    SuperLinks (superlinks - v0.8)
    Real-time statistics (zond - v0.34c)
    Host Info (hostinfo - v0.2)
    Report Creator (reports - v0.3)
    Global Plugin Settings (settings - v0.5)
    Network Discovery (discovery - v0.9)
    System Title Changer (titlechanger - v0.1)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 11, 2008 8:46 am 
Offline
Cacti User
User avatar

Joined: Wed Nov 17, 2004 5:22 pm
Posts: 191
Location: Chapel Hill, NC.
Do this:

Code:
ps -ef | grep ndo2b


If its running already then thats why the port is in use. Kill and restart ndo2db. You need to make sure the daemon starts successfully. Before restarting it enable debugging in ndo2db.cfg. Make sure to specify the logfile path.

After restarting ndo2db watch the debug log for any errors.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 11, 2008 9:31 am 
Offline
Cacti Pro User
User avatar

Joined: Wed Apr 09, 2003 2:17 am
Posts: 710
Location: Izmir/Turkey
Here is my output:
Quote:
root@yonyim1:/home/awtadm# /usr/local/nagios/bin/ndo2db-3x -c /usr/local/nagios/etc/ndo2db.cfg
root@yonyim1:/home/awtadm# ps -ef |grep ndo2db
nagios 12102 1 0 16:15 ? 00:00:00 /usr/local/nagios/bin/ndo2db-3x -c /usr/local/nagios/etc/ndo2db.cfg
root 12176 8536 0 16:15 pts/0 00:00:00 grep ndo2db
root@yonyim1:/home/awtadm# tail -f /usr/local/nagios/var/ndo2db.debug

As you see debug file is empty!
And here is nagios.log:
Quote:
root@yonyim1:/home/awtadm# tail -f /usr/local/nagios/var/nagios.log |grep ndomod
[1226412967] ndomod: Successfully reconnected to data sink! 28 items lost, 5000 queued items to flush.
[1226412967] ndomod: Error writing to data sink! Some output may get lost. 4375 queued items to flush.

And here is my ndo2db.cfg file:
Quote:
ndo2db_user=nagios
ndo2db_group=nagios

socket_type=tcp
socket_name=/usr/local/nagios/var/ndo.sock

tcp_port=5668

db_servertype=mysql
db_host=10.65.8.48 << my cacti server
db_port=3306
db_name=cacti
db_prefix=npc_
db_user=cacti
db_pass=cacti123

max_timedevents_age=1440
max_systemcommands_age=10080
max_servicechecks_age=10080
max_hostchecks_age=10080
max_eventhandlers_age=44640

debug_level=-1
debug_verbosity=1
debug_file=/usr/local/nagios/var/ndo2db.debug
max_debug_file_size=1000000

And finally here is my ndomod.cfg file:
Quote:
instance_name=default
output_type=tcpsocket
output=127.0.0.1 << my nagios server (should be cacti server?)
tcp_port=5668

output_buffer_items=5000
buffer_file=/usr/local/nagios/var/ndomod.tmp

file_rotation_interval=14400
file_rotation_timeout=60

reconnect_interval=15
reconnect_warning_interval=15

data_processing_options=-1
config_output_options=2

Is there any incorrect item in these files?
I didnt see any item in my dashboard. I can see statusmap. But no host no service etc.
Note again: I have only one db called cacti on cacti server.

_________________
Quote:
Cacti Version - 0.8.7e
Plugin Architecture - 2.5
Poller Type - CMD.php
Server Info - Linux 2.6.28-11-server
Web Server - Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.5 with Suhosin-Patch
PHP - 5.2.6-3ubuntu4.5
PHP Extensions - zip, xmlwriter, libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, session, SimpleXML, sockets, soap, SPL, shmop, standard, Reflection, posix, mime_magic, mbstring, json, iconv, hash, gettext, ftp, filter, exif, dom, dba, date, ctype, calendar, bz2, bcmath, zlib, pcre, openssl, xmlreader, apache2handler, gd, mysql, mysqli, PDO, pdo_mysql, rrdtool, snmp
MySQL - 5.0.75-0ubuntu10.2
RRDTool - 1.3.1
SNMP - 5.4.1
Plugins
    PHP Network Weathermap (weathermap - v0.97a)
    SuperLinks (superlinks - v0.8)
    Real-time statistics (zond - v0.34c)
    Host Info (hostinfo - v0.2)
    Report Creator (reports - v0.3)
    Global Plugin Settings (settings - v0.5)
    Network Discovery (discovery - v0.9)
    System Title Changer (titlechanger - v0.1)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 12, 2008 2:34 am 
Offline
Cacti Pro User
User avatar

Joined: Wed Apr 09, 2003 2:17 am
Posts: 710
Location: Izmir/Turkey
SOLVED!
Ok I found the error source.
Nagios couldn't connect to cacti DB.
Then, in /etc/mysql/my.cnf, I commented out the line
Code:
[...]
#bind-address           = 127.0.0.1
[...]

After that everything is ok now :)
For ubuntu this link has very good installation directives:
http://www.howtoforge.com/perfect_setup_ubuntu_6.06_p4

_________________
Quote:
Cacti Version - 0.8.7e
Plugin Architecture - 2.5
Poller Type - CMD.php
Server Info - Linux 2.6.28-11-server
Web Server - Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.5 with Suhosin-Patch
PHP - 5.2.6-3ubuntu4.5
PHP Extensions - zip, xmlwriter, libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, session, SimpleXML, sockets, soap, SPL, shmop, standard, Reflection, posix, mime_magic, mbstring, json, iconv, hash, gettext, ftp, filter, exif, dom, dba, date, ctype, calendar, bz2, bcmath, zlib, pcre, openssl, xmlreader, apache2handler, gd, mysql, mysqli, PDO, pdo_mysql, rrdtool, snmp
MySQL - 5.0.75-0ubuntu10.2
RRDTool - 1.3.1
SNMP - 5.4.1
Plugins
    PHP Network Weathermap (weathermap - v0.97a)
    SuperLinks (superlinks - v0.8)
    Real-time statistics (zond - v0.34c)
    Host Info (hostinfo - v0.2)
    Report Creator (reports - v0.3)
    Global Plugin Settings (settings - v0.5)
    Network Discovery (discovery - v0.9)
    System Title Changer (titlechanger - v0.1)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 14, 2008 10:25 pm 
Offline

Joined: Fri Nov 14, 2008 10:19 pm
Posts: 3
So, I am having difficulty understanding how to get NPC to read the database entries that ndo2db is writing. I have ndoutils setup, and I have verified that there is data getting written properly to mysql. I have cacti setup, and the plugin architecture installed with NPC as a plugin. NPC is installed, but I have an empty dashboard which would seem to indicate that NPC doesn't know where to read the database information.

Is there somewhere to configure the database, login, password, etc so that NPC knows where to look for it's data?

This project looks amazing, and I'd really like to take advantage of it. Any help is greatly appreciated.

EDIT: Nevermind. I didn't realize that the cacti database was modified with the required tables, prefixed with npc_. I was using a different database, and that was causing the problem.


Top
 Profile  
 
 Post subject: n2c cant's see templates
PostPosted: Tue Dec 02, 2008 4:17 am 
Offline

Joined: Tue Nov 18, 2008 5:12 am
Posts: 2
I have everything installed and working (nagios, ndoutils, cacti) and I can see the hosts
in npc.
If I try to use n2c to import hosts, I can see the hostgroups but no templates are visible.
I'm assuming that the standard Cacti templates would be visible - or do I have to create my own?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 02, 2008 10:08 am 
Offline

Joined: Tue Dec 02, 2008 9:58 am
Posts: 2
Hello divagater, first thanks for the good work, the plugin is really nice work and integrates nicely with Cacti.

I haven't used it much, but I gave your plugin a try because I wanted to be able to graph all the data collected by nagios instead of using a seperate tool such as zabbix.

It seems to me that right now it's not possible to directly graph the data collected by nagios, am I right or am I missing something?

Is this a feature? or a future goal?
* Must import (graph) Nagios performance data (semi-auto)

Thanks for your time and effort!

Nick


Top
 Profile  
 
 Post subject: Re: n2c cant's see templates
PostPosted: Tue Dec 02, 2008 10:37 am 
Offline

Joined: Tue Dec 02, 2008 9:58 am
Posts: 2
tumutbound wrote:
I have everything installed and working (nagios, ndoutils, cacti) and I can see the hosts
in npc.
If I try to use n2c to import hosts, I can see the hostgroups but no templates are visible.
I'm assuming that the standard Cacti templates would be visible - or do I have to create my own?


Have you tried using Internet Explorer? I had issues with the N2C with chrome and Firefox 3, the one that worked best was IE8...
An arrow with a dropdown box should appear when you click under template next to a hostgroup...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 65 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group