Moving the Cacti Installation

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
_JPL_
Cacti User
Posts: 67
Joined: Mon Nov 29, 2004 11:34 am

Moving the Cacti Installation

Post by _JPL_ »

I've recently had to move the cacti installation (eg: from /var/www/html/cacti to /var/www/secure/cacti) and now the RRAs do not seem to be updating and the graphs are definitely not updating. I adjusted the cron job to reflect the new path and confirmed that the proper permissions are still in place so it should be working as far as I can tell.

Where/how does cacti determine the value of <path_rra>? Could that be something to do with it not working? Is there some setting I neglected to change when I changed the physical location on the server that I should be checking?

Any help would be appreciated greatly with what I may have missed.

Thanks

EDIT: I made a symlink from the old location to the new and that seems to have fixed it (I think...still watching it) but I would rather not have to do that. There is obviously something still looking for the old location but I can't find it.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

You may want to have a look at the "settings" table for paths. Cacti by default assumes that the rra folder is a subfolder of it's main directory
Reinhard
User avatar
Frodoger
Cacti User
Posts: 94
Joined: Wed Jun 30, 2004 9:28 am
Location: Germany, Frankfurt am Main
Contact:

Post by Frodoger »

Hello,

i also use symlink to my rra directory (because the space on the /var/ partition is to small.

I works perfect for me


Frodoger
ben_c
Cacti User
Posts: 203
Joined: Mon May 14, 2007 8:12 pm
Location: Melbourne, Australia.

Post by ben_c »

Hi,

I have a similar issue, but i've moved the entire install to a different location and symlinked from old to new.

Cacti is up but from the web interface the data sources and the data templates sections are now empty. The /rra directory is still inside the main cacti directory and the permissions are all ok. The paths are all ok within the web interface as well.

When the poller runs it sees the hosts, but finds no rrd's.

10/11/2007 12:32:40 PM - SYSTEM STATS: Time:9.0372 Method:cactid Processes:2 Threads:5 Hosts:113 HostsPerProcess:57 DataSources:0 RRDsProcessed:0

Any ideas? I'm really worried i've corrupted data or lost it completely :(

I tried to dump the sql db in preparation for a reinstall and got this, could be a hint at the issue?

mysqldump: Got error: 145: Table './cacti/data_template_data' is marked as crashed and should be repaired when using LOCK TABLES
ben_c
Cacti User
Posts: 203
Joined: Mon May 14, 2007 8:12 pm
Location: Melbourne, Australia.

Post by ben_c »

Ok!

I've run a mysqlcheck over the db and it seems something became corrupt in the move.

For anyone that gets a similar issue, I ran :

mysqlcheck --auto-repair --databases cacti -u cactiuser -p

Which resolved the issue.

Sonme rrd files seem corrupt from the experience though :(

RRDTool Says:

ERROR: reading the cookie off /usr/local/cacti-0.8.6j/rra/lprtr21_5min_cpu_1732.rrd faild

Ended up deleting the files with a size = 0 and letting cacti re-create them, crisis averted :)
gnot
Posts: 1
Joined: Fri May 16, 2008 12:05 pm
Location: Greece
Contact:

Post by gnot »

Today I needed to move the cacti installation and I encountered the same problem. After some investigation I found out that the poller_item table contains the absolute paths to the RRAs.

Resolved by running the following queries:

Code: Select all

USE cactidb;
UPDATE poller_item SET rrd_path = REPLACE(rrd_path, '/usr/share/cacti', '/new/location/cacti');
The above assumes that the move was:

/usr/share/cacti ---> /new/location/cacti

and your Cacti database is cactidb

Adjust the paths and db according to your confguration.

Cacti 0.8.7b

Regards
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests