Nagios Plugin for Cacti (NPC) 2.0.4
Moderators: Developers, Moderators
Hi all,
i have a problème with NPC v2.0.4.
I can't resize "host problem", etc... on dash board.
When i clic on Portlet configuration, i have an empty screen opened with only "save" and "cancel" button.
I have seen 2 times in about 1 days a box with height modification.
I tested on linux / windows and Firefox, IE, Chrome.
Have you got any issu with that ?
Thanks,
i have a problème with NPC v2.0.4.
I can't resize "host problem", etc... on dash board.
When i clic on Portlet configuration, i have an empty screen opened with only "save" and "cancel" button.
I have seen 2 times in about 1 days a box with height modification.
I tested on linux / windows and Firefox, IE, Chrome.
Have you got any issu with that ?
Thanks,
-
- Posts: 10
- Joined: Mon Jul 16, 2007 10:57 am
-
- Posts: 33
- Joined: Tue May 05, 2009 7:28 pm
NDO2DB init script
This is actually for NDO2DB...
The release has contained in the documentation now for a very long time that a init script will be developed and added to the package, however this has not happened...
Anyway, I have created a script which is pretty much as generic as possible, it shouldn't be hard for people to work out and use...
EDIT: Now attached....
EDIT: Now updated to v1.2
EDIT: Now updated to v1.3
EDIT: Sorry attached 1.2 again fixed now ...
Chnagelog:
# - v1.0 : Initial production release, added support for multiple NDO2DB daemons running simultaneously
# - v1.1 : Added support for Nagios daemon checking, will error if nagios already running when starting.
# - v1.2 : Further error checking added and support to ask for user input on Nagios daemon state. Can now
# automatically restart the nagios daemon in sync with NDO2DB.
# - v1.3 : Bugfixes with the Nagios restart module, will now continue to question the user for a nagios
# restart, and not fail on y or n. Won't die to a failure of restart now.
Enjoy and give me any recommendations if needed.
The release has contained in the documentation now for a very long time that a init script will be developed and added to the package, however this has not happened...
Anyway, I have created a script which is pretty much as generic as possible, it shouldn't be hard for people to work out and use...
EDIT: Now attached....
EDIT: Now updated to v1.2
EDIT: Now updated to v1.3
EDIT: Sorry attached 1.2 again fixed now ...
Chnagelog:
# - v1.0 : Initial production release, added support for multiple NDO2DB daemons running simultaneously
# - v1.1 : Added support for Nagios daemon checking, will error if nagios already running when starting.
# - v1.2 : Further error checking added and support to ask for user input on Nagios daemon state. Can now
# automatically restart the nagios daemon in sync with NDO2DB.
# - v1.3 : Bugfixes with the Nagios restart module, will now continue to question the user for a nagios
# restart, and not fail on y or n. Won't die to a failure of restart now.
Enjoy and give me any recommendations if needed.
- Attachments
-
- ndo2db.txt
- ndo2db - Init script - v1.3
Remove the .txt extension BTW ;) - (4.71 KiB) Downloaded 3214 times
-
- ndo2db.txt
- ndo2db - Init script - v1.0
Remove the .txt extension BTW ;) - (3.21 KiB) Downloaded 3072 times
-
- ndo2db.txt
- ndo2db - Init script - v1.2
Remove the .txt extension BTW ;) - (4.48 KiB) Downloaded 3068 times
Last edited by aaronnicoli on Thu Dec 10, 2009 7:00 pm, edited 2 times in total.
unknown column long_output
(accidentally posted this as it's own topic in plugin_general).
I'm running npc 2.0.4, and I run my cacti and nagios servers on separate systems. I have a couple of issues. First, within the NPC tab on my cacti server I see nothing under the dropdowns for hostgroups or templates within the N2C area, even though the npc_ tables are being populated.
Another, possibly related issue, is my nagios server logs rapidly filled with errors like this:
(note i've cleaned this up to remove site specific info.)
Dec 6 22:28:02 systemX ndo2db: mysql_error: 'Unknown column 'long_output' in 'field list''
Dec 6 22:28:02 systemX ndo2db: Error: mysql_query() failed for 'INSERT INTO npc_servicechecks SET instance_id='1', service_object_id='790', check_type='
0', current_check_attempt='1', max_check_attempts='4', state='0', state_type='1', start_time=FROM_UNIXTIME(1260156482), start_time_usec='388319', end_time=FR
OM_UNIXTIME(0), end_time_usec='0', timeout='60', early_timeout='0', execution_time='0.000000', latency='15.388000', return_code='0', output='DNS OK: 0\.072 s
econds response time\.somecheck returns somestuff', long_output='', perfdata='time=0\.072212s;;;0\.000000
', command_object_id='895', command_args='somargs', command_line='/usr/local
nagios/libexec/check_dns -H somehost -s moreargs -a moreargs -w 1 -c 2' ON DUPLICATE KEY UPDAT
E instance_id='1', service_object_id='790', check_type='0', current_check_attempt='1', m
So I'm wondering what's up - did the npc tables not get created correctly by the plugin?
I'm running npc 2.0.4, and I run my cacti and nagios servers on separate systems. I have a couple of issues. First, within the NPC tab on my cacti server I see nothing under the dropdowns for hostgroups or templates within the N2C area, even though the npc_ tables are being populated.
Another, possibly related issue, is my nagios server logs rapidly filled with errors like this:
(note i've cleaned this up to remove site specific info.)
Dec 6 22:28:02 systemX ndo2db: mysql_error: 'Unknown column 'long_output' in 'field list''
Dec 6 22:28:02 systemX ndo2db: Error: mysql_query() failed for 'INSERT INTO npc_servicechecks SET instance_id='1', service_object_id='790', check_type='
0', current_check_attempt='1', max_check_attempts='4', state='0', state_type='1', start_time=FROM_UNIXTIME(1260156482), start_time_usec='388319', end_time=FR
OM_UNIXTIME(0), end_time_usec='0', timeout='60', early_timeout='0', execution_time='0.000000', latency='15.388000', return_code='0', output='DNS OK: 0\.072 s
econds response time\.somecheck returns somestuff', long_output='', perfdata='time=0\.072212s;;;0\.000000
', command_object_id='895', command_args='somargs', command_line='/usr/local
nagios/libexec/check_dns -H somehost -s moreargs -a moreargs -w 1 -c 2' ON DUPLICATE KEY UPDAT
E instance_id='1', service_object_id='790', check_type='0', current_check_attempt='1', m
So I'm wondering what's up - did the npc tables not get created correctly by the plugin?
-
- Posts: 33
- Joined: Tue May 05, 2009 7:28 pm
So it wasn't just me that had these problems, it appears the latest version of the ndo db is bugged....
Run these queries, should fix your problems:
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`;
Run these queries, should fix your problems:
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`;
Sure enough, that did the trick. Thanks.
Now i'm getting close to actually having this work. However, now when i try to map / display graphs nothing displays. From the httpd error logs on my cacti server it appears that npc is looking in the wrong place for the image files. In short, its trying to pull them from my www root, but not adding the /cacti as specified in my config.php for the cacit install. I gather this was bug that was supposed to be fixed in the latest release but its still not working near as I can tell. Anyone suggest a work around? I'm not sure where to fix this myself in the npc configuration files.
Now i'm getting close to actually having this work. However, now when i try to map / display graphs nothing displays. From the httpd error logs on my cacti server it appears that npc is looking in the wrong place for the image files. In short, its trying to pull them from my www root, but not adding the /cacti as specified in my config.php for the cacit install. I gather this was bug that was supposed to be fixed in the latest release but its still not working near as I can tell. Anyone suggest a work around? I'm not sure where to fix this myself in the npc configuration files.
aaronnicoli wrote:So it wasn't just me that had these problems, it appears the latest version of the ndo db is bugged....
Run these queries, should fix your problems:
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`;
I am experiencing that same effect. Graphs are wanting to be pulled from http://server rather thatn http://server/cacti
The path in the global.cfg is specified as /cacti/
The path in the global.cfg is specified as /cacti/
See earlier post by divagater (Fri Jun 26, 2009 12:39 am)hisgett wrote:I am experiencing that same effect. Graphs are wanting to be pulled from http://server rather thatn http://server/cacti
The path in the global.cfg is specified as /cacti/
Page 20 in this topic.
Sini
Very good...I cannot believe I missed that one. Thanks! It is working now.sini wrote:See earlier post by divagater (Fri Jun 26, 2009 12:39 am)hisgett wrote:I am experiencing that same effect. Graphs are wanting to be pulled from http://server rather thatn http://server/cacti
The path in the global.cfg is specified as /cacti/
Page 20 in this topic.
The solution u provided solve the problem I had!aaronnicoli wrote:So it wasn't just me that had these problems, it appears the latest version of the ndo db is bugged....
Run these queries, should fix your problems:
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`;
Thank you aaronnicoli.
Gonna try out your NDO2DB startup script
-
- Posts: 33
- Joined: Tue May 05, 2009 7:28 pm
Is there still npc-support ? Some people (including me) have problems with this plugin. But their topics are not answered.
http://forums.cacti.net/about35708.html
http://forums.cacti.net/about35708.html
-
- Posts: 18
- Joined: Wed Jul 20, 2005 8:44 am
PNP4Nagios $HOSTNAME$ PNP error
Hi, I integrated PNP4Nagios into Nagios. View it from Nagios Console is no problem. but when I used Notes_URL in Additional Information (NPC plugin) appear error. It seem NPC unable to translate parameter $HOSTNAME$. Any idea can solve it?
another question. integrated action_url is possible or not? like below picture (apopup.jpg)
another question. integrated action_url is possible or not? like below picture (apopup.jpg)
Re: Nagios Plugin for Cacti (NPC) 2.0.4
hello all,
i have a question.
my npc database (name:nagios) can get data via ndo2db but the npc view is nothing!
how can i do next?
npc-2.0.4
ndoutils-1.4b9
php-5.2.6
mysql-5.0.22
httpd-2.2.9
nagios-3.2.0
nagios-plugins-1.4.14
tks!!
i have a question.
my npc database (name:nagios) can get data via ndo2db but the npc view is nothing!
how can i do next?
npc-2.0.4
ndoutils-1.4b9
php-5.2.6
mysql-5.0.22
httpd-2.2.9
nagios-3.2.0
nagios-plugins-1.4.14
tks!!
-
- Posts: 18
- Joined: Wed Jul 20, 2005 8:44 am
Who is online
Users browsing this forum: No registered users and 1 guest