|
|
| Author |
Message |
palbandoz
Joined: 07 May 2008 Posts: 12
|
Posted: Wed May 28, 2008 11:10 am Post subject: |
|
|
Hi all.
Am I the only one having problems with the NPC packages? I've tried versions 2.0.0a-136, 2.0.0a-151 and 2.0.0b-166 but every time I untar those packages an error occours:
| Quote: |
[root@localhost plugins]# tar xzvf npc-2.0.0b.166.tar.gz
npc/queries/scheduled_downtime.sql
npc/queries/service_flapping_history.sql
npc/queries/contact_notifications.sql
npc/queries/timed_events.sql
npc/queries/host_comments.sql
npc/queries/services.sql
npc/queries/flapping_history.sql
npc/queries/service_status.sql
npc/queries/comments.sql
npc/queries/service_state_history.sql
npc/queries/host_state_history.sql
npc/queries/contacts.sql
npc/queries/comment_history.sql
npc/queries/contactgroup_membership.sql
npc/queries/service_downtime_history.sql
npc/queries/contact_status.sql
npc/queries/state_history.sql
npc/queries/hosts.sql
npc/queries/event_handlers.sql
npc/queries/service_event_handlers.sql
npc/queries/downtime_history.sql
npc/queries/host_flapping_history.sql
npc/queries/notifications.sql
npc/queries/host_status.sql
npc/queries/contact_notification_methods.sql
npc/queries/hostgroup_membership.sql
npc/queries/host_notifications.sql
npc/queries/timed_event_queue.sql
npc/queries/service_notifications.sql
npc/queries/host_downtime_history.sql
npc/queries/servicegroup_membership.sql
npc/queries/host_event_handlers.sql
npc/queries/service_comments.sql
npc/controllers/hostgroups.php
npc/controllers/downtime.php
npc/controllers/logentries.php
npc/controllers/statehistory.php
npc/controllers/layout.php
npc/controllers/servicegroups.php
npc/controllers/controller.php
npc/controllers/comments.php
npc/controllers/settings.php
npc/controllers/layoutDev.php
npc/controllers/services.php
npc/controllers/sync.php
npc/controllers/hosts.php
npc/controllers/nagios.php
npc/controllers/cacti.php
npc/controllers/notifications.php
npc/js/portlets-all-min.js
npc/js/src/Portlet.js
npc/js/src/build.xml
npc/js/src/monitoring/n2c.js
tar: Skipping to next header
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error exit delayed from previous errors
[root@localhost plugins]#
|
And there is free disk space to unpack it...
Any idea? (or any other link?)
Thanks |
|
| Back to top |
|
 |
pheezy Cacti User
Joined: 26 Oct 2006 Posts: 50
|
Posted: Wed May 28, 2008 3:57 pm Post subject: |
|
|
| palbandoz wrote: | Hi all.
Am I the only one having problems with the NPC packages? I've tried versions 2.0.0a-136, 2.0.0a-151 and 2.0.0b-166 but every time I untar those packages an error occours:
| Quote: |
[root@localhost plugins]# tar xzvf npc-2.0.0b.166.tar.gz
npc/queries/scheduled_downtime.sql
npc/queries/service_flapping_history.sql
npc/queries/contact_notifications.sql
npc/queries/timed_events.sql
npc/queries/host_comments.sql
npc/queries/services.sql
npc/queries/flapping_history.sql
npc/queries/service_status.sql
npc/queries/comments.sql
npc/queries/service_state_history.sql
npc/queries/host_state_history.sql
npc/queries/contacts.sql
npc/queries/comment_history.sql
npc/queries/contactgroup_membership.sql
npc/queries/service_downtime_history.sql
npc/queries/contact_status.sql
npc/queries/state_history.sql
npc/queries/hosts.sql
npc/queries/event_handlers.sql
npc/queries/service_event_handlers.sql
npc/queries/downtime_history.sql
npc/queries/host_flapping_history.sql
npc/queries/notifications.sql
npc/queries/host_status.sql
npc/queries/contact_notification_methods.sql
npc/queries/hostgroup_membership.sql
npc/queries/host_notifications.sql
npc/queries/timed_event_queue.sql
npc/queries/service_notifications.sql
npc/queries/host_downtime_history.sql
npc/queries/servicegroup_membership.sql
npc/queries/host_event_handlers.sql
npc/queries/service_comments.sql
npc/controllers/hostgroups.php
npc/controllers/downtime.php
npc/controllers/logentries.php
npc/controllers/statehistory.php
npc/controllers/layout.php
npc/controllers/servicegroups.php
npc/controllers/controller.php
npc/controllers/comments.php
npc/controllers/settings.php
npc/controllers/layoutDev.php
npc/controllers/services.php
npc/controllers/sync.php
npc/controllers/hosts.php
npc/controllers/nagios.php
npc/controllers/cacti.php
npc/controllers/notifications.php
npc/js/portlets-all-min.js
npc/js/src/Portlet.js
npc/js/src/build.xml
npc/js/src/monitoring/n2c.js
tar: Skipping to next header
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error exit delayed from previous errors
[root@localhost plugins]#
|
And there is free disk space to unpack it...
Any idea? (or any other link?)
Thanks |
It looks like the archive you downloaded is corrupt. I'd try again, maybe with a different browser. |
|
| Back to top |
|
 |
manafo
Joined: 20 Apr 2008 Posts: 4
|
Posted: Mon Jun 02, 2008 6:21 am Post subject: |
|
|
i made all the configuration but i still cant see the devices in NPC!! i got this message in nagios.log:
Error: Could not load module '/usr/local/nagios/bin/ndomod.o' -> /usr/local/nagios/var/spool/checkresults/nebmodrPvthL: undefined symbol: find_serviceextinfo |
|
| Back to top |
|
 |
mati
Joined: 10 Jun 2008 Posts: 7
|
Posted: Tue Jun 10, 2008 5:09 pm Post subject: |
|
|
Hi all, I keep getting the below error everytime I click on the NPC tab in Cacti. I have tripple checked that I meet all the requirements, etc... I'm using Ubuntu Server 8.04LTS, thank for any help.
Fatal error: Uncaught exception 'Doctrine_Manager_Exception' with message 'Empty data source name' in /usr/share/cacti/site/plugins/npc/lib/Doctrine/Manager.php:383 Stack trace: #0 /usr/share/cacti/site/plugins/npc/lib/Doctrine/Manager.php(277): Doctrine_Manager->parseDsn('mysql://cacti:S...') #1 /usr/share/cacti/site/plugins/npc/lib/Doctrine/Manager.php(237): Doctrine_Manager->openConnection('mysql://cacti:S...', NULL) #2 /usr/share/cacti/site/plugins/npc/config.php(14): Doctrine_Manager::connection('mysql://cacti:S...') #3 /usr/share/cacti/site/plugins/npc/npc.php(23): include('/usr/share/cact...') #4 {main} thrown in /usr/share/cacti/site/plugins/npc/lib/Doctrine/Manager.php on line 383 |
|
| Back to top |
|
 |
sterpstra
Joined: 27 May 2008 Posts: 32 Location: So Cal
|
Posted: Wed Jun 11, 2008 10:10 pm Post subject: Uncaught Exception |
|
|
I'm getting the same error:
Fatal error: Uncaught exception 'Doctrine_Manager_Exception' with message 'Empty data source name' in /usr/share/cacti/site/plugins/npc/lib/Doctrine/Manager.php:383 Stack trace: #0 /usr/share/cacti/site/plugins/npc/lib/Doctrine/Manager.php(277): Doctrine_Manager->parseDsn('mysql://cacti:c...') #1 /usr/share/cacti/site/plugins/npc/lib/Doctrine/Manager.php(237): Doctrine_Manager->openConnection('mysql://cacti:c...', NULL) #2 /usr/share/cacti/site/plugins/npc/config.php(14): Doctrine_Manager::connection('mysql://cacti:c...') #3 /usr/share/cacti/site/plugins/npc/npc.php(23): include('/usr/share/cact...') #4 {main} thrown in /usr/share/cacti/site/plugins/npc/lib/Doctrine/Manager.php on line 383
Any ideas?
UPDATE: OK, so I've tried a few things and here's the deal. When I initially installed NPC, the cacti database populated with all of the npc_ tables, however NDO wasn't working correctly.. I disable the plugin and fixed the NDO issue. I moved all of my Nagios data (it was in the Nagios db) to the Cacti db and tested the new connection with Nagios. Data is being populated and NDO looks good. I re-enable NPC and still got the above error. Did a reinstall of NPC (moved current dir and downloaded fresh copy), followed the instructions and still receive the same error.
I'm definitely NOT a SQL guru but from what I can tell, it appears the php file is trying to add entries to a table it doesn't like. It's quoting an Empty Data Source but I can't see exactly what table it is trying to populate. The error says mysql://cacti.c... Shouldn't it be npc_... Anyway, I'm probably saying something everyone already knows so forgive me...
Any help would be SUPER appreciated... Especially considering I am suppose to present the system soon. And I LOVE this piece of the puzzle.
-st |
|
| Back to top |
|
 |
sterpstra
Joined: 27 May 2008 Posts: 32 Location: So Cal
|
Posted: Thu Jun 12, 2008 11:10 am Post subject: |
|
|
[quote="mati"]Hi all, I keep getting the below error everytime I click on the NPC tab in Cacti. I have tripple checked that I meet all the requirements, etc... I'm using Ubuntu Server 8.04LTS, thank for any help.
Hi Mati.. I received a PM from divigater and he helped point me in the right direction. Try this: 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";
Let us know if that works.
-st |
|
| Back to top |
|
 |
mati
Joined: 10 Jun 2008 Posts: 7
|
Posted: Thu Jun 12, 2008 11:27 am Post subject: |
|
|
| Thank you sir, the gui is coming up in Cacti now. Thank again. |
|
| Back to top |
|
 |
sterpstra
Joined: 27 May 2008 Posts: 32 Location: So Cal
|
Posted: Thu Jun 12, 2008 3:08 pm Post subject: |
|
|
| sonartribe wrote: | okay, I've worked around it. I can't find any documentation which explains what the config_type relates to, but I have got my NPC to work by modifying my controllers/hosts.php and controllers/services.php so that both searches in each which is looking for config_type=1 is now looking for config_type=0! I also found this in setup.php which I've also changed to be consistent.
Thanks for your help on this divagater!
Regards
Ian |
Hi guys... It appears that I am also part of this crowd. I checked mysql and found my config_type is also 0. I modified the services.php and hosts.php but still am unable to see any data in NPC (including trying to import from N2C). I looked in the setup.php file but all config_type lines say this: config_type ..... NOT NULL default '0'
Any ideas now? |
|
| Back to top |
|
 |
sterpstra
Joined: 27 May 2008 Posts: 32 Location: So Cal
|
Posted: Thu Jun 12, 2008 3:29 pm Post subject: Re: config_type revisited |
|
|
| divagater wrote: | | sonartribe wrote: | | Billy, In a previous post, I had explained where the config_type value comes from, just in case you missed it. |
Hey Ian, I do remember you brining this up, it jus't didn't fully click. And just when I thought I had it fully figured out you throw a wrench in I think what has been throwing me off is that the sample queries in nodutils all use config_type=1 as a condition so I felt like I needed to work within that setup.
I will run through all the combinations of config_output_options in ndomod.cfg and retain_state_information in nagios.cfg so that I fully grasp what is happening. Then I will get the queries updated and documentation on how to configure.
Were you able to get running on the beta release by fixing the queries or changing your config?
~Billy |
Hey guys... Just a couple quick add-ons to this... I checked my nagio.cfg file and I have retain_state_information set to 1. I checked my database and my npc_hosts and npc_services have an id of 0 still. I have restarted Nagios thinking perhaps I missed doing that when I originally changed the file... I'll try to change the controllers/services.php and hosts.php back to 0 but since that didn't work before, I would hazard to guess it would work this time.
-st |
|
| Back to top |
|
 |
sterpstra
Joined: 27 May 2008 Posts: 32 Location: So Cal
|
Posted: Thu Jun 12, 2008 6:19 pm Post subject: |
|
|
| mati wrote: | | Thank you sir, the gui is coming up in Cacti now. Thank again. |
Hey mati.. Just curious if you are seeing your NPC populated now? Mine is still blank and I'm not so sure my fix was the root of the problem. |
|
| Back to top |
|
 |
mati
Joined: 10 Jun 2008 Posts: 7
|
Posted: Fri Jun 13, 2008 8:49 am Post subject: |
|
|
| No sir, I can see the NPC now in Cacti but it's all blank even thought I can see data been populated in the database. Try various thing but still blank. |
|
| Back to top |
|
 |
mati
Joined: 10 Jun 2008 Posts: 7
|
Posted: Fri Jun 13, 2008 11:59 am Post subject: |
|
|
hey Sterpstra can you run the below link and see what you get, thanks.
| Code: | | http://<cacti_url>/plugins/npc/npc.php?module=services&action=getServices&p_state=any |
|
|
| Back to top |
|
 |
mati
Joined: 10 Jun 2008 Posts: 7
|
Posted: Mon Jun 16, 2008 9:17 am Post subject: |
|
|
I finally got NPC to show data in Cacti, I kept getting this error,
<b>Fatal error</b>: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2005] Unknown MySQL server host '''' (1)' in /usr/share/cacti/site/plugins/npc/lib/Doctrine/Connection.php:381
Stack trace:
#0 /usr/share/cacti/site/plugins/npc/lib/Doctrine/Connection.php(381): PDO->__construct('mysql:host='';d...', ''cacti'', '''', Array)
#1 /usr/share/cacti/site/plugins/npc/lib/Doctrine/Connection.php(904): Doctrine_Connection->connect()
#2 /usr/share/cacti/site/plugins/npc/lib/Doctrine/Connection.php(705): Doctrine_Connection->execute('SELECT COUNT(DI...', Array)
#3 /usr/share/cacti/site/plugins/npc/lib/Doctrine/Query.php(1789): Doctrine_Connection->fetchAll('SELECT COUNT(DI...', Array)
#4 /usr/share/cacti/site/plugins/npc/lib/Doctrine/Pager.php(109): Doctrine_Query->count(Array)
#5 /usr/share/cacti/site/plugins/npc/lib/Doctrine/Pager.php(499): Doctrine_Pager->_initialize(Array)
#6 /usr/share/cacti/site/plugins/npc/controllers/services.php(196): Doctrine_Pager->execute(Array, 3)
#7 /usr/share/cacti/site/plugins/npc/c in <b>/usr/share/cacti/site/plugins/npc/lib/Doctrine/Connection.php</b> on line <b>381</b><br />
everytime I ran this link http://<cacti_url>/plugins/npc/npc.php?module=services&action=getServices&p_state=any to check if the NPC plugin could read the data from the SQL Database, so I went into /usr/share/cacti/site/plugins/npc/lib/Doctrine/Connection.php and commented out line 381 and 382 and added | Code: | | $this->dbh = new PDO('mysql:host=localhost;dbname=test','root','xxxxxxxxxx'); | instead and now everything seems to be working. Hopefully this will help anyone else who is stuck and maybe someone can come up with a better fix. |
|
| Back to top |
|
 |
sterpstra
Joined: 27 May 2008 Posts: 32 Location: So Cal
|
Posted: Mon Jun 16, 2008 5:45 pm Post subject: |
|
|
| mati wrote: | I finally got NPC to show data in Cacti, I kept getting this error,
everytime I ran this link http://<cacti_url>/plugins/npc/npc.php?module=services&action=getServices&p_state=any to check if the NPC plugin could read the data from the SQL Database, so I went into /usr/share/cacti/site/plugins/npc/lib/Doctrine/Connection.php and commented out line 381 and 382 and added | Code: | | $this->dbh = new PDO('mysql:host=localhost;dbname=test','root','xxxxxxxxxx'); | instead and now everything seems to be working. Hopefully this will help anyone else who is stuck and maybe someone can come up with a better fix. |
Hi mati.. Are you getting ALL of your data? I made some quick hacks to see if I could find the root of the problem but only was able to populate the main screen.. Nothing else was visible (hosts, services, etc...)
I was waiting on divigater to see if he could come up with a solution.
-st |
|
| Back to top |
|
 |
mati
Joined: 10 Jun 2008 Posts: 7
|
Posted: Tue Jun 17, 2008 2:00 pm Post subject: |
|
|
| Yes, I'm. After making the changes you posted and the PDO change it's all working now. |
|
| Back to top |
|
 |
|