|
|
| Author |
Message |
divagater Cacti User
Joined: 17 Nov 2004 Posts: 101 Location: Chapel Hill, NC.
|
Posted: Thu Mar 27, 2008 1:17 pm Post subject: Nagios Plugin for Cacti 2.0.0b (build 166) released |
|
|
NPC-2.0.0b (build 166) is now available.
View the quick start guide for installation instructions.
Build 166 notes:
* This beta release of NPC fixes a few minor bugs.
* Setting config_output_options=2 (or 3) in ndomod.cfg is now a requirement. This corrects some instances of no data or duplicate data.
* All grids were updated to fit the bottom bar to the bottom of the browser.
* All grids now have an option for configuring the number of rows displayed.
* All grids now have the option for configuring the refresh rate.
* Portlet rows/refresh is adjusted by clicking the configuration icon in top right corner of the portlet.
* Like all other aspects of the UI the rows and refresh configuration is saved server side on a per user basis.
Build 151 notes:
Besides a few bug fixes this release takes advantage of many of the plugin management features found in the plugin architecture 2.x. including install/uninstall options as well as enable/disable option.
Uninstall removes all database traces of NPC.
NOTE: NPC now has to be installed via the plugin management section even if you are upgrading from a previous release. If you have an entry for NPC in global.php it can be removed.
----------------------------
I setup a community Trac site to host the NPC project. The NPC source as well as install guide, screen shots, etc. can be found there.
With the exception of some installation notes documentation is very slim. Here are a few tips to get you started:
* Most lists including services or hosts can be double clicked to open additional detail screens.
* Most lists including services or hosts can be right clicked to popup a context menu used to issue service or host commands.
* If a graph is mapped to a service or host, a graph icon will be displayed in the hosts and services screens. A single left click of this icon will popup the graph.
* Most green check marks (started/enabled) or most red X (stopped/disabled) can be double clicked to toggle the option (requires that remote commands are enabled.)
* Most grid columns can be re-ordered via drag and drop.
* Most grid columns can be hidden and currently hidden columns can be viewed by clicking a down arrow to the right of the column heading.
* Dashboard portlets can be closed or minimized. Closed portlets can be made visible again by clicking the Portlets button on the far right of the toolbar on the Dashboard tab and then select which portlets you want displayed.
* All changes to the interface (portlets, column order, etc.) are saved server side on a per user basis. Customize the UI your way and it is available anywhere you login.
* Importing Nagios hosts is done from the N2C link on the left side tree menu. Before starting an import you need to click in the template field to the right of the hostgroup you are importing. Doing so will expose a select box for assigning a host template.
Bugs/support
The interface currently has some quirks that I am aware of. Dragging a portlet will sometimes move several portlets at once. When this happens just reload the NPC page and the portlet order should be correct.
Grids will sometimes fail to render or display fully. Closing and re-opening the problem tab usually resolves that. When viewing host/service detail screens, allow all the data to load before clicking through the tabs.
For all other issues post your problem here, or if you are inclined open a ticket on the NPC Trac site. This is an alpha release so I fully expect issues and I need your help to find them
Cheers,
Billy
| Description: |
|
| Filesize: |
246.34 KB |
| Viewed: |
13418 Time(s) |

|
Last edited by divagater on Sun Apr 20, 2008 3:02 pm; edited 5 times in total |
|
| Back to top |
|
 |
UpSa
Joined: 04 Mar 2008 Posts: 3
|
Posted: Thu Mar 27, 2008 2:25 pm Post subject: |
|
|
this looks very promising
time for alpha test !
|
|
| Back to top |
|
 |
aleto
Joined: 25 May 2005 Posts: 37
|
Posted: Thu Mar 27, 2008 7:37 pm Post subject: |
|
|
Hi,
I have installed successfully the plugin, ndo2db is populaiting the tables with data so thats working correctly.
However when i select the "NPC" tab, no data or what so ever is displayed.
#php -v
PHP 5.2.3 (cli) (built: Aug 20 2007 17:53:31)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with the ionCube PHP Loader v3.1.32, Copyright (c) 2002-2007, by ionCube Ltd.
# mysql -V
mysql Ver 14.12 Distrib 5.0.45, for pc-linux-gnu (i686) using readline 5.0
ndoutils-1.4b7
nagios-3.0
|
|
| Back to top |
|
 |
divagater Cacti User
Joined: 17 Nov 2004 Posts: 101 Location: Chapel Hill, NC.
|
Posted: Thu Mar 27, 2008 9:30 pm Post subject: |
|
|
Hi aleto. When you click the NPC tab all you see for instance is a big white background without any part of the interface being drawn? If that is the case either php is dying with a fatal error or the javascript is not loading.
Do me a favor and tail your apache error logs then click the tab again. Look for a log entry with "PHP Fatal error" in it.
If you are on an rpm based system get me the output of
rpm -qa | grep php
NPC requires PDO which I thought was included in PHP 5.2 however I just noticed that the php-pdo module may need to be installed seperatley.
Also, let me know what web browser you are using. I have tested in firefox 2.x and IE 7
~Billy
|
|
| Back to top |
|
 |
rmcclain
Joined: 28 Mar 2008 Posts: 9
|
Posted: Fri Mar 28, 2008 3:22 am Post subject: N2C isn't showing any hosts |
|
|
I think I'm missing something.. how does the configuration information get populated in the database? I see various npc_tables, but they are all empty. ndo2db is running. Clicking the N2C link brings up an empty list. There doesn't seem to be any way to add any of the hosts from my Nagios setup.
This looks fantastic if I can get it to work
Thanks
|
|
| Back to top |
|
 |
divagater Cacti User
Joined: 17 Nov 2004 Posts: 101 Location: Chapel Hill, NC.
|
Posted: Fri Mar 28, 2008 5:39 am Post subject: |
|
|
| Quote: | | I think I'm missing something.. how does the configuration information get populated in the database? |
Everything requires that ndo2db populate the npc_ tables. Without that you can not actually use n2c to import the Nagios hosts or view any status data etc.
So for you the issue is clearly that ndo2b is not getting Nagios events into the database. You should have 2 ndo config files:
ndo2db.cfg (Config for the ndo2db daemon)
ndomod.cfg (Config for the module ndo2db.o)
Both of these configs need to be setup the same in terms of whether you are using the tcpsocket option or the unixsocket. So in both files I have the tcpsocket option uncommented (not the default) and they are both set to use port 5668 (that was default). Also double check the database params in ndo2db.cfg.
Next, edit ndo2db.cfg and set:
debug_level=1
debug_file=<some/path>
Restart ndo2db and restart nagios. Check the ndo2db debug log for errors.
~Billy
|
|
| Back to top |
|
 |
miky_willis
Joined: 25 Apr 2006 Posts: 11
|
Posted: Fri Mar 28, 2008 5:53 am Post subject: |
|
|
Hello Good job thanks !
So I try this. And I got this issue
The installation of the plugin into cacti was good I got the tab and interface is good...
But when I compile ndo and tell nagios to use it, it does not work. Nagios won't start.
First of all I had a problem with php-json
[root@manage var]# rpmbuild --rebuild /home/xxxx/php-json-4.3.2_1.2.1-1.aurore.src.rpm
Installation de /home/xxxx/php-json-4.3.2_1.2.1-1.aurore.src.rpm
erreur: échec du déballage de l'archive dans fichier /usr/src/redhat/SOURCES/php-json-ext-1.2.1.tar.bz2;47ecc86b: cpio: read
erreur: /home/xxxx/php-json-4.3.2_1.2.1-1.aurore.src.rpm ne peut être installé
I have this in nagios.log
ndomod seems to be launched
[1206699130] Nagios 3.0 starting... (PID=4381)
[1206699130] Local time is Fri Mar 28 11:12:10 CET 2008
[1206699130] LOG VERSION: 2.0
[1206699130] ndomod: NDOMOD 1.4b7 (10-31-2007) Copyright (c) 2005-2007 Ethan Galstad (nagios@nagios.org)
[1206699130] ndomod: Successfully connected to data sink. 0 queued items to flush.
[root@manage ndoutils-1.4b7]# service nagios restart
Running configuration check...done.
Stopping nagios: kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
done.
Starting nagios: done.
[root@manage ndoutils-1.4b7]#
So nagios do not run and I don't see any errors
In my nagios.cfg:
check_external_commands=1
command_check_interval=-1
event_broker_options=-1
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
process_performance_data=1
AND
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Total Warnings: 0
Total Errors: 0
I'm using fedora core 8, nagios3, cacti 0.8.7b, php5.2.4-3, mysql 5.0.45-4
Any idea... I am trying to look at the problem with json...
thx
|
|
| Back to top |
|
 |
divagater Cacti User
Joined: 17 Nov 2004 Posts: 101 Location: Chapel Hill, NC.
|
Posted: Fri Mar 28, 2008 5:55 am Post subject: |
|
|
| json is included in PHP 5.2 and above so don't install the RPM.
|
|
| Back to top |
|
 |
divagater Cacti User
Joined: 17 Nov 2004 Posts: 101 Location: Chapel Hill, NC.
|
Posted: Fri Mar 28, 2008 5:57 am Post subject: |
|
|
Sorry for that short answer above but I wanted you to get that message right away
So Nagios "appears" to start but the actual process is just gone? Or is the nagios process there but its not doing anything?
|
|
| Back to top |
|
 |
miky_willis
Joined: 25 Apr 2006 Posts: 11
|
Posted: Fri Mar 28, 2008 7:12 am Post subject: |
|
|
OK great for json I found the answer juste after my message...
For nagios it seems to start but the process is not there.
|
|
| Back to top |
|
 |
divagater Cacti User
Joined: 17 Nov 2004 Posts: 101 Location: Chapel Hill, NC.
|
Posted: Fri Mar 28, 2008 7:24 am Post subject: |
|
|
By default nagios does not have debug enabled. In nagios.cfg find/set the following parameter:
debug_level=1
Make note of where it writes the debug log:
debug_file=/usr/local/nagios/var/nagios.debug
Additionaly you could crank up the verbosity from 1 to 2
debug_verbosity=1
I suspect that the ndomod.o is crashing Nagios. To test that just comment out the line that loads the module:
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
Also be sure that the ndomod.o was copied from ndomod-3x.o is the ndoutils source. Check the file size and verify they are the same. Accidently using the 2x version of ndomod would probably kill Nagios.
~Billy
|
|
| Back to top |
|
 |
miky_willis
Joined: 25 Apr 2006 Posts: 11
|
Posted: Fri Mar 28, 2008 7:34 am Post subject: |
|
|
Thanks for rapid answer
When I comment out the broker nagios starts great
with debug level -1 (everything) I got this output when I do a restart
[1206707430.078748] [001.0] [pid=9433] drop_privileges() start
[1206707430.078801] [004.0] [pid=9433] Original UID/GID: 0/0
[1206707430.079338] [004.0] [pid=9433] New UID/GID: 504/504
[1206707430.080008] [064.1] [pid=9433] Making callbacks (type 9)...
[1206707430.080165] [064.1] [pid=9433] Making callbacks (type 9)...
[1206707430.080247] [064.1] [pid=9433] Making callbacks (type 9)...
[1206707430.083438] [064.1] [pid=9433] Making callbacks (type 9)...
[1206707430.095762] [064.1] [pid=9433] Making callbacks (type 9)...
ndomod.o in /usr/local/nagios/bin/ really is the ndomod-3x.o
I miss somtehing but I don't know what...
|
|
| Back to top |
|
 |
divagater Cacti User
Joined: 17 Nov 2004 Posts: 101 Location: Chapel Hill, NC.
|
Posted: Fri Mar 28, 2008 7:56 am Post subject: |
|
|
| Quote: | | I'm using fedora core 8, nagios3, cacti 0.8.7b, php5.2.4-3, mysql 5.0.45-4 |
I just installed an FC8 system. I will emulate your environment and see what I come up with. Should have it all setup pretty soon.
~Billy
|
|
| Back to top |
|
 |
miky_willis
Joined: 25 Apr 2006 Posts: 11
|
Posted: Fri Mar 28, 2008 8:17 am Post subject: |
|
|
perhaps I miss something with ndomod config...
in ndo2db.cfg or in ndomod.cfg
ndo2db.cfg:
ndo2db_user=nagios
ndo2db_group=nagios
socket_type=unix
socket_name=/usr/local/nagios/var/ndo.sock
tcp_port=5668
db_servertype=mysql
db_host=localhost
db_port=3306
db_name=cacti
db_prefix=nagios_
db_user=cactiuser
db_pass=cactisuer
# Keep timed events for 24 hours
max_timedevents_age=1440
# Keep system commands for 1 week
max_systemcommands_age=10080
# Keep service checks for 1 week
max_servicechecks_age=10080
# Keep host checks for 1 week
max_hostchecks_age=10080
# Keep event handlers for 31 days
max_eventhandlers_age=44640
debug_level=1
debug_verbosity=1
debug_file=@localstatedir@/ndo2db.debug
max_debug_file_size=1000000
ndomod.cfg:
instance_name=default
#output_type=file
#output_type=tcpsocket
output_type=unixsocket
#output=/usr/local/nagios/var/ndo.dat
#output=127.0.0.1
output=/usr/local/nagios/var/ndo.sock
tcp_port=5668
output_buffer_items=5000
buffer_file=/usr/local/nagios/var/ndomod.tmp
file_rotation_interval=14400
#file_rotation_command=rotate_ndo_log
file_rotation_timeout=60
reconnect_interval=15
reconnect_warning_interval=15
#reconnect_warning_interval=900
data_processing_options=-1
config_output_options=2
Please tell me if there is something wrong there
|
|
| Back to top |
|
 |
divagater Cacti User
Joined: 17 Nov 2004 Posts: 101 Location: Chapel Hill, NC.
|
Posted: Fri Mar 28, 2008 8:52 am Post subject: |
|
|
Thanks for posting your configs. Still working on getting a matching env setup but in the mean time I see one thing wrong and have a suggestion for trying something different.
1st, in ndo2db.cfg db_prefix has to be set like:
db_prefix=npc_
You have it currently as nagios_.
Next, I notice that you are using unix socket for the communication between ndo2db daemon and ndo module. This is the default setting however I recall having an issue with that as well. Try doing the following for me and see if it helps:
In ndomod.cfg set:
output_type=tcpsocket
output=127.0.0.1
tcp_port=5668
In ndo2db.cfg set:
socket_type=tcp
tcp_port=5668
This causes the ndomod.o module to post events to port 5668 on localhost and for ndo2db daemon to listen on port 5668 for events passed from ndomod.o.
~Billy
|
|
| Back to top |
|
 |
|