Nagios Plugin for Cacti (NPC) 2.0.4
Moderators: Developers, Moderators
Re: Nagios Plugin for Cacti (NPC) 2.0.4
I grabbed the files and tar'ed them. I put them here if anyone just wants to download 2.0.4: http://www.scsorlando.com/files/npc2.0.4.tar
Many thanks the original developer for restarting this, i hope you come back!
Many thanks the original developer for restarting this, i hope you come back!
Quote from Bash.org: "I was once thrown out of barnes and noble for moving the bibles to the fiction section."
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Nagios Plugin for Cacti (NPC) 2.0.4
I love you tag line quote. Funny. It's not all fiction, but the modern (aka AD 400) church has aggressively attempted to turn it into that.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Re:
I had the same issue with the grid being empty, i followed the quickstart guide and your commands to the T and while it had populated data in the hosts and services tables, the status tables were empty. I ran the following update and bam, grid started filling out.
I took a look at the setup.php for npc, seems the columns are not in the create_table statements. So if you are not getting populating on the NPC page, make sure to check your tables for the following columns, if they arent there, run the statements below.
I took a look at the setup.php for npc, seems the columns are not in the create_table statements. So if you are not getting populating on the NPC page, make sure to check your tables for the following columns, if they arent there, run the statements below.
aaronnicoli wrote:Finally fixed the issue myself.
The SQL doesn't create the needed default columns....
I ran the following to fix the database and actually get somewhere...
ALTER TABLE `npc_hostchecks` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
ALTER TABLE `npc_hoststatus` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
ALTER TABLE `npc_servicechecks` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
ALTER TABLE `npc_servicestatus` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
ALTER TABLE `npc_statehistory` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
ALTER TABLE `npc_eventhandlers` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
ALTER TABLE `npc_systemcommands` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
ALTER TABLE `npc_notifications` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
Quote from Bash.org: "I was once thrown out of barnes and noble for moving the bibles to the fiction section."
Re: Nagios Plugin for Cacti (NPC) 2.0.4
hi all,
I am unable to get NPC working. I'm using
- Cacti 0.8.7g
- Plugin Architecture Version 2.8
- Solaris 10
After following the instruction to install NPC, the NPC tab doesn't show up in the Cacit. (I did edit the global.php to include $plugins[] = 'npc';) Moreover, when I tried to access npc by http://someserver/cacti/plugin/npc/npc.php, I got the error
"You are not permitted to access this section of Cacti. If you feel that you need access to this particular section, please contact the Cacti administrator"
It didn't work even I change the NPC directory to 777 permission.
Any help is greatly appreciated!!
Many thanks!!!
Pedro
I am unable to get NPC working. I'm using
- Cacti 0.8.7g
- Plugin Architecture Version 2.8
- Solaris 10
After following the instruction to install NPC, the NPC tab doesn't show up in the Cacit. (I did edit the global.php to include $plugins[] = 'npc';) Moreover, when I tried to access npc by http://someserver/cacti/plugin/npc/npc.php, I got the error
"You are not permitted to access this section of Cacti. If you feel that you need access to this particular section, please contact the Cacti administrator"
It didn't work even I change the NPC directory to 777 permission.
Any help is greatly appreciated!!
Many thanks!!!
Pedro
Re: Nagios Plugin for Cacti (NPC) 2.0.4
Hi all,
for anyone trying to get this working on FreeBSD (as I have been for the past few hours), you might need to reinstall the package with "event broker" enabled.
cd /usr/ports/net-mgmt/nagios
make rmconfig
make deinstall
make reinstall
When prompted with the options screen, make sure the following line is ticked:
[X] EVENT_BROKER Enable event broker functionality
Scott
for anyone trying to get this working on FreeBSD (as I have been for the past few hours), you might need to reinstall the package with "event broker" enabled.
cd /usr/ports/net-mgmt/nagios
make rmconfig
make deinstall
make reinstall
When prompted with the options screen, make sure the following line is ticked:
[X] EVENT_BROKER Enable event broker functionality
Scott
Re: Nagios Plugin for Cacti (NPC) 2.0.4
Hi, I have a problem with my npc plugin on cacti.
I have tryed a lot of tips from this thread but I can't resolve my problem.
This is my configuration:
- SO Linux Centos 5.5
- Cacti version: Version 0.8.7g
- Plugin Architecture Version: 2.8
- Clog 1.6
- Monitor 1.2
- Settings 0.7
- Boost 4.3
- Npc 2.0.4
- Rrdclean 0.41
- Thold 0.4.1
- php-pdo-5.3.5
- json version 1.2.1
- Nagios 3.2.3
- ndoutils 1.4b9
Nagios work well; this is the output of log:
[1298482732] Nagios 3.2.3 starting... (PID=21436)
[1298482732] Local time is Wed Feb 23 18:38:52 CET 2011
[1298482732] LOG VERSION: 2.0
[1298482732] ndomod: NDOMOD 1.4b9 (10-27-2009) Copyright (c) 2009 Nagios Core Development Team and Community Contributors
[1298482732] ndomod: Successfully connected to data sink. 25 queued items to flush.
[1298482732] ndomod: Successfully flushed 25 queued items to data sink.
[1298482732] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
[1298482732] Finished daemonizing... (New PID=21438)
When I enter in the NPC tab of my cacti, Nagios seems On and everything on the top is green but there is nothing in the Dashboard tab and I can't open new tabs (see attached image).
In my apache log appear this message everytie that I enter in the NPC tab:
[Wed Feb 23 19:10:30 2011] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Undefined index: action in /media/volumen/cacti/plugins/npc/top_graph_header.php on line 95, referer: http://cacti.xxx.com/settings.php?tab=npc
I think is a problem of my db but I don't know what I can do.
Thanks in advance.
Giu
I have tryed a lot of tips from this thread but I can't resolve my problem.
This is my configuration:
- SO Linux Centos 5.5
- Cacti version: Version 0.8.7g
- Plugin Architecture Version: 2.8
- Clog 1.6
- Monitor 1.2
- Settings 0.7
- Boost 4.3
- Npc 2.0.4
- Rrdclean 0.41
- Thold 0.4.1
- php-pdo-5.3.5
- json version 1.2.1
- Nagios 3.2.3
- ndoutils 1.4b9
Nagios work well; this is the output of log:
[1298482732] Nagios 3.2.3 starting... (PID=21436)
[1298482732] Local time is Wed Feb 23 18:38:52 CET 2011
[1298482732] LOG VERSION: 2.0
[1298482732] ndomod: NDOMOD 1.4b9 (10-27-2009) Copyright (c) 2009 Nagios Core Development Team and Community Contributors
[1298482732] ndomod: Successfully connected to data sink. 25 queued items to flush.
[1298482732] ndomod: Successfully flushed 25 queued items to data sink.
[1298482732] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
[1298482732] Finished daemonizing... (New PID=21438)
When I enter in the NPC tab of my cacti, Nagios seems On and everything on the top is green but there is nothing in the Dashboard tab and I can't open new tabs (see attached image).
In my apache log appear this message everytie that I enter in the NPC tab:
[Wed Feb 23 19:10:30 2011] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Undefined index: action in /media/volumen/cacti/plugins/npc/top_graph_header.php on line 95, referer: http://cacti.xxx.com/settings.php?tab=npc
I think is a problem of my db but I don't know what I can do.
Thanks in advance.
Giu
- Attachments
-
- cactishot.jpeg (94.33 KiB) Viewed 11119 times
Re: Nagios Plugin for Cacti (NPC) 2.0.4
I solve my problem (or only a part of it)!!giustones wrote:Hi, I have a problem with my npc plugin on cacti.
I have tryed a lot of tips from this thread but I can't resolve my problem.
This is my configuration:
- SO Linux Centos 5.5
- Cacti version: Version 0.8.7g
- Plugin Architecture Version: 2.8
- Clog 1.6
- Monitor 1.2
- Settings 0.7
- Boost 4.3
- Npc 2.0.4
- Rrdclean 0.41
- Thold 0.4.1
- php-pdo-5.3.5
- json version 1.2.1
- Nagios 3.2.3
- ndoutils 1.4b9
Nagios work well; this is the output of log:
[1298482732] Nagios 3.2.3 starting... (PID=21436)
[1298482732] Local time is Wed Feb 23 18:38:52 CET 2011
[1298482732] LOG VERSION: 2.0
[1298482732] ndomod: NDOMOD 1.4b9 (10-27-2009) Copyright (c) 2009 Nagios Core Development Team and Community Contributors
[1298482732] ndomod: Successfully connected to data sink. 25 queued items to flush.
[1298482732] ndomod: Successfully flushed 25 queued items to data sink.
[1298482732] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
[1298482732] Finished daemonizing... (New PID=21438)
When I enter in the NPC tab of my cacti, Nagios seems On and everything on the top is green but there is nothing in the Dashboard tab and I can't open new tabs (see attached image).
In my apache log appear this message everytie that I enter in the NPC tab:
[Wed Feb 23 19:10:30 2011] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Undefined index: action in /media/volumen/cacti/plugins/npc/top_graph_header.php on line 95, referer: http://cacti.xxx.com/settings.php?tab=npc
I think is a problem of my db but I don't know what I can do.
Thanks in advance.
Giu
I create 3 tables in my db with those querys:
CREATE TABLE `npc_host_graphs` (`host_graph_id` int(11) NOT NULL auto_increment,`host_object_id` int(11) NOT NULL,`local_graph_id` mediumint(8) unsigned NOT NULL,`pri` tinyint(1) default 1,PRIMARY KEY (`host_graph_id`),KEY `idx1` (`host_object_id`)) ENGINE=InnoDB;
CREATE TABLE `npc_settings` (`user_id` mediumint(8) unsigned NOT NULL,`settings` text default null,PRIMARY KEY (`user_id`)) ENGINE=InnoDB COMMENT='NPC user settings';
CREATE TABLE `npc_service_graphs` (`service_graph_id` int(11) NOT NULL auto_increment,`service_object_id` int(11) NOT NULL,`local_graph_id` mediumint(8) unsigned NOT NULL,`pri` tinyint(1) default 1,PRIMARY KEY (`service_graph_id`),KEY `idx1` (`service_object_id`)) ENGINE=InnoDB;
Now I see the tabs and my Dashboard work but sometimes it not refresh the view and in the apache log I can see this lines:
[Wed Feb 23 19:33:03 2011] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Undefined variable: temp in /media/volumen/cacti/plugins/npc/controllers/servicegroups.php on line 206, referer: http://cacti.xxx.com/plugins/npc/npc.ph ... drawLayout
[Wed Feb 23 19:33:03 2011] [error] [client xxx.xxx.xxx.xxx] PHP Warning: Invalid argument supplied for foreach() in /media/volumen/cacti/plugins/npc/controllers/servicegroups.php on line 206, referer: http://cacti.xxx.com/plugins/npc/npc.ph ... drawLayout
[Wed Feb 23 19:36:16 2011] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Undefined index: action in /media/volumen/cacti/plugins/npc/top_graph_header.php on line 95, referer: http://cacti.xxx.com/plugins/npc/npc.php
Any ideas?
-
- Posts: 5
- Joined: Tue Mar 15, 2011 4:46 pm
Re: Nagios Plugin for Cacti (NPC) 2.0.4
I'm getting the following error with the npc plugin. The error was taken from apache2 error.log after clicking on the npc tab.
PHP Fatal error: Uncaught exception 'Doctrine_Manager_Exception' with message 'Could not parse dsn' in /usr/share/cacti/site/plugins/npc/lib/Doctrine/Manager.php:335\nStack trace:\n#0 /usr/share/cacti/site/plugins/npc/lib/Doctrine/Manager.php(350): Doctrine_Manager->_buildDsnPartsArray('mysql://cacti:c...')\n#1 /usr/share/cacti/site/plugins/npc/lib/Doctrine/Manager.php(214): Doctrine_Manager->parseDsn('mysql://cacti:c...')\n#2 /usr/share/cacti/site/plugins/npc/lib/Doctrine/Manager.php(176): Doctrine_Manager->openConnection('mysql://cacti:c...', NULL)\n#3 /usr/share/cacti/site/plugins/npc/config.php(17): Doctrine_Manager::connection('mysql://cacti:c...')\n#4 /usr/share/cacti/site/plugins/npc/npc.php(23): include('/usr/share/cact...')\n#5 {main}\n thrown in /usr/share/cacti/site/plugins/npc/lib/Doctrine/Manager.php on line 335, referer: http://127.0.0.1/cacti/plugins.php
Im using
cacti version = 0.8.7g
NPC version = 2.0.4
nagios version = 3.2.3
I havent installed NDOutils but I don't think this is the cause.
So basically when I click the npc tab and the top in firefox I get a white screen and under other browsers it gives page can't be displayed.
Any help is appreciated!
Figured it out. FYI if anyone else has this problem....
Edit your /plugins/npc/config.php file and replace
$dsn = "$database_type://$database_username:$database_password@$database_hostname:$database_port/$database_default";
with:
$dsn = "$database_type://'$database_username':'$database_password'@'$database_hostname':$database_port/$database_default";
PHP Fatal error: Uncaught exception 'Doctrine_Manager_Exception' with message 'Could not parse dsn' in /usr/share/cacti/site/plugins/npc/lib/Doctrine/Manager.php:335\nStack trace:\n#0 /usr/share/cacti/site/plugins/npc/lib/Doctrine/Manager.php(350): Doctrine_Manager->_buildDsnPartsArray('mysql://cacti:c...')\n#1 /usr/share/cacti/site/plugins/npc/lib/Doctrine/Manager.php(214): Doctrine_Manager->parseDsn('mysql://cacti:c...')\n#2 /usr/share/cacti/site/plugins/npc/lib/Doctrine/Manager.php(176): Doctrine_Manager->openConnection('mysql://cacti:c...', NULL)\n#3 /usr/share/cacti/site/plugins/npc/config.php(17): Doctrine_Manager::connection('mysql://cacti:c...')\n#4 /usr/share/cacti/site/plugins/npc/npc.php(23): include('/usr/share/cact...')\n#5 {main}\n thrown in /usr/share/cacti/site/plugins/npc/lib/Doctrine/Manager.php on line 335, referer: http://127.0.0.1/cacti/plugins.php
Im using
cacti version = 0.8.7g
NPC version = 2.0.4
nagios version = 3.2.3
I havent installed NDOutils but I don't think this is the cause.
So basically when I click the npc tab and the top in firefox I get a white screen and under other browsers it gives page can't be displayed.
Any help is appreciated!
Figured it out. FYI if anyone else has this problem....
Edit your /plugins/npc/config.php file and replace
$dsn = "$database_type://$database_username:$database_password@$database_hostname:$database_port/$database_default";
with:
$dsn = "$database_type://'$database_username':'$database_password'@'$database_hostname':$database_port/$database_default";
Last edited by dwcallahan on Tue Mar 29, 2011 9:37 pm, edited 1 time in total.
Re: Nagios Plugin for Cacti (NPC) 2.0.4
Hello! Can you help me, I installed NPC but it didn`t work. A don`t know what the problem is..
Please help me.
P.S. Sorry for my english, I`m from Ukraine...
Please help me.
P.S. Sorry for my english, I`m from Ukraine...
- Attachments
-
- Screen.PNG (83.6 KiB) Viewed 10929 times
-
- Posts: 2
- Joined: Mon Jun 20, 2011 3:45 pm
- Location: Huthwaite
Re: Nagios Plugin for Cacti (NPC) 2.0.4
Saniapa
I think it may be to do with the version of PHP you have running?
I think it may be to do with the version of PHP you have running?
Re: Nagios Plugin for Cacti (NPC) 2.0.4
It might also be due to the package he downloaded.
Try this one instead: http://www.mediafire.com/?iefyesb24ppsbwl
Try this one instead: http://www.mediafire.com/?iefyesb24ppsbwl
-
- Posts: 2
- Joined: Mon Jun 20, 2011 3:45 pm
- Location: Huthwaite
Re: Nagios Plugin for Cacti (NPC) 2.0.4
Ah! Indeed, thats much better, I had the same issue, it worked fine, just didnt get the images but I put it down to my php version, thanks for that
Re: Nagios Plugin for Cacti (NPC) 2.0.4
No problem at all, it was a painful issue for me to figure out, so you may have noticed me replying to just about every NPC topic on the forum in the last day or so about using the right package. I just want to help others avoid the pain I went through haha.
Re: Nagios Plugin for Cacti (NPC) 2.0.4
Hi,
I have some problem with configuration dashboard on NPC 2.04. When i want resize portlet configuration i see empty screen and just to options to do: save and cancel (look on attachment file). I tried to change configuration with firefox, chrome, ie on various Os and nothig :/
Somebody knows how to solve this problem?
Thanks 4 youreply
I have some problem with configuration dashboard on NPC 2.04. When i want resize portlet configuration i see empty screen and just to options to do: save and cancel (look on attachment file). I tried to change configuration with firefox, chrome, ie on various Os and nothig :/
Somebody knows how to solve this problem?
Thanks 4 youreply
- Attachments
-
- a.png (21.23 KiB) Viewed 10436 times
Re: Nagios Plugin for Cacti (NPC) 2.0.4
I see that all process are working properly but that in fact the cacti database is returning null even though there is data populated in the database. I do return data directly from the event viewer as nagios and cacti are on the same box. I did look back in the thread and tried a few of the things but they had no effect so I put them back to their respective defaults.
I appreciate any input toward this resolution.
http://servername/cacti/plugins/npc/npc ... _state=any
{"response":{"value":{"items":[],"total_count":0,"version":1}}}
Thanks,
David
I appreciate any input toward this resolution.
http://servername/cacti/plugins/npc/npc ... _state=any
{"response":{"value":{"items":[],"total_count":0,"version":1}}}
Thanks,
David
- Attachments
-
- myscreencacti.PNG (61.17 KiB) Viewed 10329 times
Who is online
Users browsing this forum: No registered users and 0 guests