RRD's won't populate after server move :S

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

sourcecode
Posts: 14
Joined: Tue May 16, 2006 4:59 am

Post by sourcecode »

btw sorry for typing so fast/so much :(
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

sourcecode wrote:is it possible to change the paths in settings> paths ? i cant find anything there about <path_cacti>, only got on mine:
I'm afraid you'll have to use phpMyadmin, or use "update ... from ... set" from the MySQL prompt :(
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
sourcecode
Posts: 14
Joined: Tue May 16, 2006 4:59 am

Post by sourcecode »

actually im in my phpmyadmin now. and under the settings table i cant find anything about path_cacti:
these are the only path options available:

path_cactid
path_cactilog /usr/share/cacti/site/log/cacti.log
path_html_export
path_html_export_skip
path_php_binary /usr/bin/php
path_rrdtool /usr/bin/rrdtool
path_rrdtool_default_font
path_snmpbulkwalk /usr/bin/snmpbulkwalk
path_snmpget /usr/bin/snmpget
path_snmpgetnext /usr/bin/snmpgetnext
path_snmpwalk /usr/bin/snmpwalk
path_webroot /usr/share/cacti/site --> which is the correct dir
sourcecode
Posts: 14
Joined: Tue May 16, 2006 4:59 am

Post by sourcecode »

ok. after changing the directory for every rrd (damn that took a long time) i could now see the graphs beings populated. php rebuild_poller_cache.php --> i also had to run this as sugested by reinhard.
i will keep u posted if anything goes wrong.
thanks again
Rick
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

sourcecode wrote:is it possible to change the paths in settings> paths ? i cant find anything there about <path_cacti>, only got on mine:
I was wrong. path_cacti indeed is defined dynamically in ./include/config.php

Code: Select all

/* used for includes */
$config["base_path"] = strtr(ereg_replace("(.*)[\/\\]include", "\\1", dirname(__FILE__)), "\", "/");
$config["library_path"] = ereg_replace("(.*[\/\\])include", "\\1lib", dirname(__FILE__));
$config["include_path"] = dirname(__FILE__);
So forget about this part of my message
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

sourcecode wrote:ok. after changing the directory for every rrd (damn that took a long time) i could now see the graphs beings populated. php rebuild_poller_cache.php --> i also had to run this as sugested by reinhard.
i will keep u posted if anything goes wrong.
thanks again
Rick
Whoaa. Not sure, that is was a good idea. Please try creating a new rrd file and see, if it is in the correct place. Again, you are too fast for me. It would be possible, even if using sql, to do what you've done with a single update sql
Reinhard
sourcecode
Posts: 14
Joined: Tue May 16, 2006 4:59 am

Post by sourcecode »

yes i know it was possible lol. i just nothing else to do at work so i did it one by one ;)
it seems to be working now. if something goes wrong i will hassle u again ;)
thanks
Daniel15
Posts: 7
Joined: Fri Sep 15, 2006 9:52 pm
Location: Melbourne, Australia

Post by Daniel15 »

Yeah, I recently moved my Cacti installation... It used to be at cacti.[domain] with a cPanel username of 'cacti', but I moved it to admin.[domain]/cacti with a cPanel username of 'admin'. This was so I could put all administrative utilities under the one subdomain.

Anyways, I found that I needed to change all the RRD paths in the poller_item table (like sourcecode said, I think). After doing this, everything seems to be working perfectly :D
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

In such instances, personally I'd like to create a symlink from cacti installation dir pointing to the "real" dir. Doing so, we keep our data storage on a different volume
Reinhard
plouj
Posts: 7
Joined: Thu Aug 31, 2006 6:04 pm

Post by plouj »

As far as I can remember, I used sed on a mysql dump of my cacti database to fix this issue after being forced to move the cacti directory. I think only the poller_item table had to have the hard-coded paths changed. Cacti has been running just fine since then.

I don't think the db should actually store full paths and I think this should be filed as a bug. Agree/disagree?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest